Drupal Constants

Constant Value (Instance Specific) Type
DRUPAL_ROOT
C:\xampp\htdocs\drupal7
string
VERSION
7.58
string
DRUPAL_CORE_COMPATIBILITY
7.x
string
DRUPAL_MINIMUM_PHP
5.2.4
string
DRUPAL_MINIMUM_PHP_MEMORY_LIMIT
32M
string
ERROR_REPORTING_HIDE
0
integer
ERROR_REPORTING_DISPLAY_SOME
1
integer
ERROR_REPORTING_DISPLAY_ALL
2
integer
CACHE_PERMANENT
0
integer
CACHE_TEMPORARY
-1
integer
WATCHDOG_EMERGENCY
0
integer
WATCHDOG_ALERT
1
integer
WATCHDOG_CRITICAL
2
integer
WATCHDOG_ERROR
3
integer
WATCHDOG_WARNING
4
integer
WATCHDOG_NOTICE
5
integer
WATCHDOG_INFO
6
integer
WATCHDOG_DEBUG
7
integer
DRUPAL_BOOTSTRAP_CONFIGURATION
0
integer
DRUPAL_BOOTSTRAP_PAGE_CACHE
1
integer
DRUPAL_BOOTSTRAP_DATABASE
2
integer
DRUPAL_BOOTSTRAP_VARIABLES
3
integer
DRUPAL_BOOTSTRAP_SESSION
4
integer
DRUPAL_BOOTSTRAP_PAGE_HEADER
5
integer
DRUPAL_BOOTSTRAP_LANGUAGE
6
integer
DRUPAL_BOOTSTRAP_FULL
7
integer
DRUPAL_ANONYMOUS_RID
1
integer
DRUPAL_AUTHENTICATED_RID
2
integer
DRUPAL_KILOBYTE
1024
integer
LANGUAGE_NONE
und
string
LANGUAGE_TYPE_CONTENT
language_content
string
LANGUAGE_TYPE_INTERFACE
language
string
LANGUAGE_TYPE_URL
language_url
string
LANGUAGE_LTR
0
integer
LANGUAGE_RTL
1
integer
REQUEST_TIME
1542481226
integer
CHECK_PLAIN
0
integer
PASS_THROUGH
-1
integer
REGISTRY_RESET_LOOKUP_CACHE
1
integer
REGISTRY_WRITE_LOOKUP_CACHE
2
integer
DRUPAL_PHP_FUNCTION_PATTERN
[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
string
SID

string
USERNAME_MAX_LENGTH
60
integer
EMAIL_MAX_LENGTH
254
integer
USER_REGISTER_ADMINISTRATORS_ONLY
0
integer
USER_REGISTER_VISITORS
1
integer
USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL
2
integer
SAVED_NEW
1
integer
SAVED_UPDATED
2
integer
SAVED_DELETED
3
integer
CSS_SYSTEM
-100
integer
CSS_DEFAULT
0
integer
CSS_THEME
100
integer
JS_LIBRARY
-100
integer
JS_DEFAULT
0
integer
JS_THEME
100
integer
HTTP_REQUEST_TIMEOUT
-1
integer
DRUPAL_NO_CACHE
-1
integer
DRUPAL_CACHE_CUSTOM
-2
integer
DRUPAL_CACHE_PER_ROLE
1
integer
DRUPAL_CACHE_PER_USER
2
integer
DRUPAL_CACHE_PER_PAGE
4
integer
DRUPAL_CACHE_GLOBAL
8
integer
MARK_READ
0
integer
MARK_NEW
1
integer
MARK_UPDATED
2
integer
MENU_IS_ROOT
1
integer
MENU_VISIBLE_IN_TREE
2
integer
MENU_VISIBLE_IN_BREADCRUMB
4
integer
MENU_LINKS_TO_PARENT
8
integer
MENU_MODIFIED_BY_ADMIN
32
integer
MENU_CREATED_BY_ADMIN
64
integer
MENU_IS_LOCAL_TASK
128
integer
MENU_IS_LOCAL_ACTION
256
integer
MENU_NORMAL_ITEM
6
integer
MENU_CALLBACK
0
integer
MENU_SUGGESTED_ITEM
20
integer
MENU_LOCAL_TASK
132
integer
MENU_DEFAULT_LOCAL_TASK
140
integer
MENU_LOCAL_ACTION
388
integer
MENU_CONTEXT_NONE
0
integer
MENU_CONTEXT_PAGE
1
integer
MENU_CONTEXT_INLINE
2
integer
MENU_FOUND
1
integer
MENU_NOT_FOUND
2
integer
MENU_ACCESS_DENIED
3
integer
MENU_SITE_OFFLINE
4
integer
MENU_SITE_ONLINE
5
integer
MENU_MAX_PARTS
9
integer
MENU_MAX_DEPTH
9
integer
MENU_PREFERRED_LINK
1cf698d64d1aa4b83907cf6ed55db3a7f8e92c91
string
STREAM_WRAPPERS_ALL
0
integer
STREAM_WRAPPERS_LOCAL
1
integer
STREAM_WRAPPERS_READ
4
integer
STREAM_WRAPPERS_WRITE
8
integer
STREAM_WRAPPERS_VISIBLE
16
integer
STREAM_WRAPPERS_HIDDEN
12
integer
STREAM_WRAPPERS_LOCAL_HIDDEN
13
integer
STREAM_WRAPPERS_WRITE_VISIBLE
28
integer
STREAM_WRAPPERS_READ_VISIBLE
20
integer
STREAM_WRAPPERS_NORMAL
28
integer
STREAM_WRAPPERS_LOCAL_NORMAL
29
integer
FILE_CREATE_DIRECTORY
1
integer
FILE_MODIFY_PERMISSIONS
2
integer
FILE_EXISTS_RENAME
0
integer
FILE_EXISTS_REPLACE
1
integer
FILE_EXISTS_ERROR
2
integer
FILE_STATUS_PERMANENT
1
integer
UNICODE_ERROR
-1
integer
UNICODE_SINGLEBYTE
0
integer
UNICODE_MULTIBYTE
1
integer
PREG_CLASS_UNICODE_WORD_BOUNDARY
\x{0}-\x{2F}\x{3A}-\x{40}\x{5B}-\x{60}\x{7B}-\x{A9}\x{AB}-\x{B1}\x{B4}\x{B6}-\x{B8}\x{BB}\x{BF}\x{D7}\x{F7}\x{2C2}-\x{2C5}\x{2D2}-\x{2DF}\x{2E5}-\x{2EB}\x{2ED}\x{2EF}-\x{2FF}\x{375}\x{37E}-\x{385}\x{387}\x{3F6}\x{482}\x{55A}-\x{55F}\x{589}-\x{58A}\x{5BE}\x{5C0}\x{5C3}\x{5C6}\x{5F3}-\x{60F}\x{61B}-\x{61F}\x{66A}-\x{66D}\x{6D4}\x{6DD}\x{6E9}\x{6FD}-\x{6FE}\x{700}-\x{70F}\x{7F6}-\x{7F9}\x{830}-\x{83E}\x{964}-\x{965}\x{970}\x{9F2}-\x{9F3}\x{9FA}-\x{9FB}\x{AF1}\x{B70}\x{BF3}-\x{BFA}\x{C7F}\x{CF1}-\x{CF2}\x{D79}\x{DF4}\x{E3F}\x{E4F}\x{E5A}-\x{E5B}\x{F01}-\x{F17}\x{F1A}-\x{F1F}\x{F34}\x{F36}\x{F38}\x{F3A}-\x{F3D}\x{F85}\x{FBE}-\x{FC5}\x{FC7}-\x{FD8}\x{104A}-\x{104F}\x{109E}-\x{109F}\x{10FB}\x{1360}-\x{1368}\x{1390}-\x{1399}\x{1400}\x{166D}-\x{166E}\x{1680}\x{169B}-\x{169C}\x{16EB}-\x{16ED}\x{1735}-\x{1736}\x{17B4}-\x{17B5}\x{17D4}-\x{17D6}\x{17D8}-\x{17DB}\x{1800}-\x{180A}\x{180E}\x{1940}-\x{1945}\x{19DE}-\x{19FF}\x{1A1E}-\x{1A1F}\x{1AA0}-\x{1AA6}\x{1AA8}-\x{1AAD}\x{1B5A}-\x{1B6A}\x{1B74}-\x{1B7C}\x{1C3B}-\x{1C3F}\x{1C7E}-\x{1C7F}\x{1CD3}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{206F}\x{207A}-\x{207E}\x{208A}-\x{208E}\x{20A0}-\x{20B8}\x{2100}-\x{2101}\x{2103}-\x{2106}\x{2108}-\x{2109}\x{2114}\x{2116}-\x{2118}\x{211E}-\x{2123}\x{2125}\x{2127}\x{2129}\x{212E}\x{213A}-\x{213B}\x{2140}-\x{2144}\x{214A}-\x{214D}\x{214F}\x{2190}-\x{244A}\x{249C}-\x{24E9}\x{2500}-\x{2775}\x{2794}-\x{2B59}\x{2CE5}-\x{2CEA}\x{2CF9}-\x{2CFC}\x{2CFE}-\x{2CFF}\x{2E00}-\x{2E2E}\x{2E30}-\x{3004}\x{3008}-\x{3020}\x{3030}\x{3036}-\x{3037}\x{303D}-\x{303F}\x{309B}-\x{309C}\x{30A0}\x{30FB}\x{3190}-\x{3191}\x{3196}-\x{319F}\x{31C0}-\x{31E3}\x{3200}-\x{321E}\x{322A}-\x{3250}\x{3260}-\x{327F}\x{328A}-\x{32B0}\x{32C0}-\x{33FF}\x{4DC0}-\x{4DFF}\x{A490}-\x{A4C6}\x{A4FE}-\x{A4FF}\x{A60D}-\x{A60F}\x{A673}\x{A67E}\x{A6F2}-\x{A716}\x{A720}-\x{A721}\x{A789}-\x{A78A}\x{A828}-\x{A82B}\x{A836}-\x{A839}\x{A874}-\x{A877}\x{A8CE}-\x{A8CF}\x{A8F8}-\x{A8FA}\x{A92E}-\x{A92F}\x{A95F}\x{A9C1}-\x{A9CD}\x{A9DE}-\x{A9DF}\x{AA5C}-\x{AA5F}\x{AA77}-\x{AA79}\x{AADE}-\x{AADF}\x{ABEB}\x{E000}-\x{F8FF}\x{FB29}\x{FD3E}-\x{FD3F}\x{FDFC}-\x{FDFD}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6B}\x{FEFF}-\x{FF0F}\x{FF1A}-\x{FF20}\x{FF3B}-\x{FF40}\x{FF5B}-\x{FF65}\x{FFE0}-\x{FFFD}
string
MAIL_LINE_ENDINGS

string
BLOCK_REGION_NONE
-1
integer
BLOCK_CUSTOM_FIXED
0
integer
BLOCK_CUSTOM_ENABLED
1
integer
BLOCK_CUSTOM_DISABLED
2
integer
BLOCK_VISIBILITY_NOTLISTED
0
integer
BLOCK_VISIBILITY_LISTED
1
integer
BLOCK_VISIBILITY_PHP
2
integer
COMMENT_NOT_PUBLISHED
0
integer
COMMENT_PUBLISHED
1
integer
COMMENT_MODE_FLAT
0
integer
COMMENT_MODE_THREADED
1
integer
COMMENT_ANONYMOUS_MAYNOT_CONTACT
0
integer
COMMENT_ANONYMOUS_MAY_CONTACT
1
integer
COMMENT_ANONYMOUS_MUST_CONTACT
2
integer
COMMENT_FORM_SEPARATE_PAGE
0
integer
COMMENT_FORM_BELOW
1
integer
COMMENT_NODE_HIDDEN
0
integer
COMMENT_NODE_CLOSED
1
integer
COMMENT_NODE_OPEN
2
integer
FIELD_STORAGE_UPDATE
update
string
FIELD_STORAGE_INSERT
insert
string
FIELD_CARDINALITY_UNLIMITED
-1
integer
FIELD_BEHAVIOR_NONE
1
integer
FIELD_BEHAVIOR_DEFAULT
2
integer
FIELD_BEHAVIOR_CUSTOM
4
integer
FIELD_LOAD_CURRENT
FIELD_LOAD_CURRENT
string
FIELD_LOAD_REVISION
FIELD_LOAD_REVISION
string
IMAGE_STORAGE_NORMAL
1
integer
IMAGE_STORAGE_OVERRIDE
2
integer
IMAGE_STORAGE_DEFAULT
4
integer
IMAGE_STORAGE_EDITABLE
3
integer
IMAGE_STORAGE_MODULE
6
integer
IMAGE_DERIVATIVE_TOKEN
itok
string
MENU_MAX_MENU_NAME_LENGTH_UI
27
integer
NODE_NOT_PUBLISHED
0
integer
NODE_PUBLISHED
1
integer
NODE_NOT_PROMOTED
0
integer
NODE_PROMOTED
1
integer
NODE_NOT_STICKY
0
integer
NODE_STICKY
1
integer
NODE_NEW_LIMIT
1539889226
integer
NODE_ACCESS_ALLOW
allow
string
NODE_ACCESS_DENY
deny
string
NODE_ACCESS_IGNORE

NULL
RDF_DEFAULT_BUNDLE

string
PREG_CLASS_NUMBERS
\x{30}-\x{39}\x{b2}\x{b3}\x{b9}\x{bc}-\x{be}\x{660}-\x{669}\x{6f0}-\x{6f9}\x{966}-\x{96f}\x{9e6}-\x{9ef}\x{9f4}-\x{9f9}\x{a66}-\x{a6f}\x{ae6}-\x{aef}\x{b66}-\x{b6f}\x{be7}-\x{bf2}\x{c66}-\x{c6f}\x{ce6}-\x{cef}\x{d66}-\x{d6f}\x{e50}-\x{e59}\x{ed0}-\x{ed9}\x{f20}-\x{f33}\x{1040}-\x{1049}\x{1369}-\x{137c}\x{16ee}-\x{16f0}\x{17e0}-\x{17e9}\x{17f0}-\x{17f9}\x{1810}-\x{1819}\x{1946}-\x{194f}\x{2070}\x{2074}-\x{2079}\x{2080}-\x{2089}\x{2153}-\x{2183}\x{2460}-\x{249b}\x{24ea}-\x{24ff}\x{2776}-\x{2793}\x{3007}\x{3021}-\x{3029}\x{3038}-\x{303a}\x{3192}-\x{3195}\x{3220}-\x{3229}\x{3251}-\x{325f}\x{3280}-\x{3289}\x{32b1}-\x{32bf}\x{ff10}-\x{ff19}
string
PREG_CLASS_PUNCTUATION
\x{21}-\x{23}\x{25}-\x{2a}\x{2c}-\x{2f}\x{3a}\x{3b}\x{3f}\x{40}\x{5b}-\x{5d}\x{5f}\x{7b}\x{7d}\x{a1}\x{ab}\x{b7}\x{bb}\x{bf}\x{37e}\x{387}\x{55a}-\x{55f}\x{589}\x{58a}\x{5be}\x{5c0}\x{5c3}\x{5f3}\x{5f4}\x{60c}\x{60d}\x{61b}\x{61f}\x{66a}-\x{66d}\x{6d4}\x{700}-\x{70d}\x{964}\x{965}\x{970}\x{df4}\x{e4f}\x{e5a}\x{e5b}\x{f04}-\x{f12}\x{f3a}-\x{f3d}\x{f85}\x{104a}-\x{104f}\x{10fb}\x{1361}-\x{1368}\x{166d}\x{166e}\x{169b}\x{169c}\x{16eb}-\x{16ed}\x{1735}\x{1736}\x{17d4}-\x{17d6}\x{17d8}-\x{17da}\x{1800}-\x{180a}\x{1944}\x{1945}\x{2010}-\x{2027}\x{2030}-\x{2043}\x{2045}-\x{2051}\x{2053}\x{2054}\x{2057}\x{207d}\x{207e}\x{208d}\x{208e}\x{2329}\x{232a}\x{23b4}-\x{23b6}\x{2768}-\x{2775}\x{27e6}-\x{27eb}\x{2983}-\x{2998}\x{29d8}-\x{29db}\x{29fc}\x{29fd}\x{3001}-\x{3003}\x{3008}-\x{3011}\x{3014}-\x{301f}\x{3030}\x{303d}\x{30a0}\x{30fb}\x{fd3e}\x{fd3f}\x{fe30}-\x{fe52}\x{fe54}-\x{fe61}\x{fe63}\x{fe68}\x{fe6a}\x{fe6b}\x{ff01}-\x{ff03}\x{ff05}-\x{ff0a}\x{ff0c}-\x{ff0f}\x{ff1a}\x{ff1b}\x{ff1f}\x{ff20}\x{ff3b}-\x{ff3d}\x{ff3f}\x{ff5b}\x{ff5d}\x{ff5f}-\x{ff65}
string
PREG_CLASS_CJK
\x{1100}-\x{11FF}\x{3040}-\x{309F}\x{30A1}-\x{318E}\x{31A0}-\x{31B7}\x{31F0}-\x{31FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FCF}\x{A000}-\x{A48F}\x{A4D0}-\x{A4FD}\x{A960}-\x{A97F}\x{AC00}-\x{D7FF}\x{F900}-\x{FAFF}\x{FF21}-\x{FF3A}\x{FF41}-\x{FF5A}\x{FF66}-\x{FFDC}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}
string
SHORTCUT_DEFAULT_SET_NAME
shortcut-set-1
string
DRUPAL_MAXIMUM_TEMP_FILE_AGE
21600
integer
DRUPAL_CRON_DEFAULT_THRESHOLD
10800
integer
DRUPAL_USER_TIMEZONE_DEFAULT
0
integer
DRUPAL_USER_TIMEZONE_EMPTY
1
integer
DRUPAL_USER_TIMEZONE_SELECT
2
integer
DRUPAL_DISABLED
0
integer
DRUPAL_OPTIONAL
1
integer
DRUPAL_REQUIRED
2
integer
DRUPAL_WEIGHT_SELECT_MAX
100
integer
REGIONS_VISIBLE
visible
string
REGIONS_ALL
all
string
DIR_SEP
\
string

Comments

Drupal Contribution
Git Commands
RESTful Services
Lando Commands
Docker Commands
MySQL
Database Quick Code
Drush Commands
Drupal Console
PHP Quick Code
Drupal Quick Code
Composer Commands
Linux Commands
Linux Shell Scripting
Drupal Hooks
Twig Tricks
PHPUnit Test
PhpMyAdmin
Drupal Constants
CSS Clues
BLT Commands
Vagrant Commands
Localhost
127.0.0.1
Drupal Interview
Drupal Certifications
Concept & Definitions
Mac Tips
Windows Tips
Browser Tips

Best Practice

Use 'elseif' instead of 'else if'
#CodingTips

As of PHP 5.4 you can also use the short array syntax, which replaces array() with []
#CodingTips

Functions in general shall be named using snake_case(say, my_function()), and using camelCase(say, myFunction()) when declared within a plugin class
#CodingTips

Variables in general shall be named using snake_case(say, $my_variable), and using camelCase(say, $myVariable) when declared within a plugin class
#CodingTips

Manage automatically assigning of new permissions whenever a module is enabled here- admin/config/people/accounts
#ConfigurationTips

Manage source of Main-menu and User-menu links here- admin/structure/menu/settings
#ConfigurationTips

Helper function(s) shall be named prefixing an underscore(say, _my_helper_function()), which can prevent hooks from being called
#CodingTips

Ideally, configuring of 'Private file system path' at admin/config/media/file-system should be located outside of your Drupal root folder(say, ../my_private_files)
#ConfigurationTips

You should be aware that uploading files as 'Private file' will slow down the process of loading the files as Drupal has to be bootstrapped for every file that needs to be downloaded
#ConfigurationTips #BeAware

Code should always be pushed up(dev -> staging -> production) and databases should only be pushed down(production -> staging -> dev)
#DevelopmentTips

Get Raw SQL Query of drupal dynamic queries before executing it using $query->__toString();
#DebugTips

In VI-Editor, Press ESC key to come in command mode and for undo type :U and for redo type :Ctrl+R
#LinuxTips

Insert queries must always use a query builder object(layer of abstraction), allowing individual database drivers special handling for column values (if applicable), example case for LOB and BLOB fields.
#DatabaseQueryTips

Drupal uses the .inc extension to prevent files from being executed directly.
#DevelopmentTips

Popular Posts