Redaxo Cheatsheet – 4.5.0 beta

Core: Slice REX VARS | Genereal REX VARS | $REX core keys | REX ACTION | ExtensionPoints

Xform: objparams | ExtensionPoints

Others: API Doku | DB schema

published by: jdlx c/o rexdev.de | last updated: 03.12.2013 15:16 | license: CC BY-NC-SA 3.0 Creative Commons Lizenzvertrag

Slice (Module/Block) related REX VARS

Input Output
VALUE[1~20] associates the input to rex_article_slice.value# REX_VALUE[1~20] / REX_VALUE[params] substituted with value escaped by htmlspecialchars() and*** nl2br() *** in backend edit mode nl2br() will NOT be applied! params: id=1~20 callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_HTML_VALUE[1~20] / REX_HTML_VALUE[params] substituted with value with only opening/ending PHP tags escaped params: id=1~20 callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_PHP_VALUE[1~20] / REX_PHP_VALUE[params] substituted with raw unescaped value with params: id=1~20 callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_IS_VALUE[1~20] returns true or false depending on if the value is empty
REX_LINK_BUTTON[1~10] / REX_LINK_BUTTON[params] substituted with LINK BUTTON Widget params: id=1~10 category=INT associates the input to rex_article_slice.link# REX_LINK[1~10] substituted with frontend URL of the article
REX_LINK_ID[1~10] substituted with article_id
REX_LINKLIST_BUTTON[1~10] / REX_LINKLIST_BUTTON[params] substituted with LINK LIST Widget associates the input to rex_article_slice.linklist# params: id=1~10 category=INT REX_LINK_LIST[1~10] substituted with article_ids as comma separated string
REX_MEDIA_BUTTON[1~10] / REX_MEDIA_BUTTON[params] substituted with MEDIA Widget associates the input to rex_article_slice.file# params: id=1~10 category=INT types=jpg,png,.. preview=0/1 REX_MEDIA[1~10] substituted with filename
REX_MEDIALIST_BUTTON[1~10] / REX_MEDIALIST_BUTTON[params] substituted with MEDIA LIST Widget associates the input to rex_article_slice.filelist# params: id=1~10 category=INT types=jpg,png,.. preview=0/1 REX_MEDIALIST[1~10] substituted with filenames as comma separated string
INPUT_PHP associates the input to rex_article_slice.php REX_PHP
INPUT_HTML associates the input to rex_article_slice.html REX_HTML

General REX VARS

Placeholder
REX_ARTICLE[INT] / REX_ARTICLE[params] substituted with article content params: id=1~20 clang=INT ctype=INT field=??? callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_ARTICLE_ID substituted with current article id
REX_CATEGORY[params] substituted with value of field of category params: id=INT clang=INT field=STRING callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_CATEGORY_ID substituted with current category id
REX_CLANG_ID substituted with current clang id
REX_CTYPE_ID substituted with current ctype id
REX_MODULE_ID substituted with current module id
REX_SLICE_ID substituted with current slice id
REX_TEMPLATE[INT] substituted with template content params: id=INT callback=STRING ifempty=STRING instead=STRING prefix=STRING suffix=STRING
REX_TEMPLATE_ID substituted with current template id
REX_USER_ID substituted with current user's id – note: value only available while active backend user session
REX_USER_LOGIN substituted with current user's login – note: value only available while active backend user session

$REX core keys

Array-Key Type Content Default/Example/File
$REX['ACKEY'] array core accesskeys (usage requires perm accesskeys[]) ./redaxo/include/master.inc.php#L138-L144
$REX['ADDON'] array addon related data
$REX['ART'] array article related data
$REX['ARTICLE'] object rex_article current article's data
$REX['ARTICLE_ID'] int current article's id
$REX['CLANG'] array all clangs with id & name
$REX['CUR_CLANG'] int current clang's id
$REX['DB'] array database access data ./redaxo/include/master.inc.php#L124-L135
$REX['DEFAULT_TEMPLATE'] int default template's id ./redaxo/include/master.inc.php#L50
$REX['DIRPERM'] int octal default directory permission ./redaxo/include/master.inc.php#L33
$REX['ERROR_EMAIL'] string email used in error messages ./redaxo/include/master.inc.php#L31
$REX['EXTENSIONS'] array extensionpoints with registered extension
$REX['EXTPERM'] array core & addon defined perms
$REX['EXTRAPERM'] array core & addon defined extra perms
$REX['FILEPERM'] int octal default file permission ./redaxo/include/master.inc.php#L32
$REX['FRONTEND_FILE'] string default: index.php ./redaxo/include/master.inc.php#L89
$REX['FRONTEND_PATH'] string absolute path to redaxo root folder ./redaxo/include/master.inc.php#L81
$REX['GENERATED_PATH'] string absolute path to redaxo cache folder ./redaxo/include/master.inc.php#L80
$REX['GG'] bool ???
$REX['HTDOCS_PATH'] string relative path to frontend
$REX['INCLUDE_PATH'] string path ro redaxo inlcude folder ./redaxo/include/master.inc.php#L78
$REX['INSTNAME'] string date/id slug of current redaxo release ./redaxo/include/master.inc.php#L34
$REX['LANG'] string locale of backend ./redaxo/include/master.inc.php#L53
$REX['LOCALES'] array available backend locales
$REX['LOGIN'] object rex_backend_login user login related data
$REX['MAXCLANGS'] int maximum of defineable clangs (default: 15) ./redaxo/include/master.inc.php#L101
$REX['MAXLOGINS'] int maximum number of logins (default: 50) ./redaxo/include/master.inc.php#L98
$REX['MEDIAFOLDER'] string absolute path to media folder ./redaxo/include/master.inc.php#L82
$REX['MEDIAPOOL'] array mediapool related data & params ./redaxo/include/master.inc.php#L118-L121
$REX['MEDIA_DIR'] string relative path (from redaxo root) to mediapool files ./redaxo/include/master.inc.php#L76
$REX['MEDIA_ADDON_DIR'] string relative path (from redaxo root) to addon/plugin files ./redaxo/include/master.inc.php#L77
$REX['MINOR_VERSION'] int redaxo version n.n.X ./redaxo/include/master.inc.php#L30
$REX['MOD_REWRITE'] bool flag to invoke url rewrites ./redaxo/include/master.inc.php#L57
$REX['MYSQL_VERSION'] int host's mysql version ./redaxo/include/master.inc.php#L38
$REX['NOFUNCTIONS'] bool ???
$REX['NOTFOUND_ARTICLE_ID'] int “404” article id ./redaxo/include/master.inc.php#L44
$REX['PERM'] array available core/addon perms
$REX['PSWFUNC'] string name of PHP pwd hashing function ./redaxo/include/master.inc.php#L92
$REX['REDAXO'] bool TRUE if current scope is backend
$REX['RELOGINDELAY'] int seconds backend login UI is locked after failed login ./redaxo/include/master.inc.php#L95
$REX['RE_CAT_ID'] array ???
$REX['SERVER'] string common usage: http://DOMAIN.TLD/ ./redaxo/include/master.inc.php#L26
$REX['SERVERNAME'] string common usage: DOMAIN.TLD ./redaxo/include/master.inc.php#L27
$REX['SESSION_DURATION'] int backend session timeout in seconds ./redaxo/include/master.inc.php#L35
$REX['SETUP'] bool TRUE if in install/setup mode ./redaxo/include/master.inc.php#L25
$REX['START_ARTICLE_ID'] int id of start article ./redaxo/include/master.inc.php#L41
$REX['START_CLANG_ID'] int id of start clang ./redaxo/include/master.inc.php#L47
$REX['START_PAGE'] string default backend page ./redaxo/include/master.inc.php#L104
$REX['SUBVERSION'] int redaxo version n.X.n ./redaxo/include/master.inc.php#L29
$REX['SYSTEM_ADDONS'] array names of core addons ./redaxo/include/master.inc.php#L115
$REX['TABLE_PREFIX'] string tables without this prefix are considered foreign and exluded from exports ./redaxo/include/master.inc.php#L85
$REX['TEMP_PREFIX'] string prefix marking temp files ./redaxo/include/master.inc.php#L86
$REX['TIMEZONE'] string PHP timezone ./redaxo/include/master.inc.php#L107
$REX['USE_ETAG'] string use ETAG ./redaxo/include/master.inc.php#L65
$REX['USE_GZIP'] string use GZIP ./redaxo/include/master.inc.php#L61
$REX['USE_LAST_MODIFIED'] string use last modified ./redaxo/include/master.inc.php#L69
$REX['USE_MD5'] string use md5 ./redaxo/include/master.inc.php#L73
$REX['USER'] object user data
$REX['VARIABLES'] array array of REX VARS objects
$REX['VERSION'] int redaxo version X.n.n ./redaxo/include/master.inc.php#L28

$REX_ACTION

Placeholder Type Content
$REX_ACTION['ARTICLE_ID'] int current article id
$REX_ACTION['CLANG_ID'] int current clang id
$REX_ACTION['CTYPE_ID'] int current ctyle id
$REX_ACTION['EVENT'] string
$REX_ACTION['HTML'] string
$REX_ACTION['LINK'] array
$REX_ACTION['MEDIA'] array
$REX_ACTION['MEDIALIST'] array
$REX_ACTION['MSG'] string
$REX_ACTION['MODULE_ID'] int current module id
$REX_ACTION['PHP']
$REX_ACTION['SAVE']
$REX_ACTION['SLICE_ID'] int current slice id
$REX_ACTION['VALUE'] array

ExtensionPoints

ExtensionPoint Core/Addon::Plugin File #Line
A1_AFTER_DB_EXPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L416
A1_AFTER_DB_IMPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L191
A1_AFTER_FILE_EXPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L455
A1_AFTER_FILE_IMPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L263
A1_BEFORE_DB_IMPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L104
A1_BEFORE_FILE_EXPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L446
A1_BEFORE_FILE_IMPORT import_export ./redaxo/include/addons/import_export/functions/function_import_export.inc.php #L239
A62_CUSTOM_FIELD metainfo ./redaxo/include/addons/metainfo/extensions/extension_common.inc.php #L415
A62_TYPE_FIELDS metainfo ./redaxo/include/addons/metainfo/classes/class.rex_table_expander.inc.php #L31
ALL_GENERATED core ./redaxo/include/functions/function_rex_generate.inc.php #L32
ARTICLE_GENERATED core ./redaxo/include/functions/function_rex_generate.inc.php #L303
ART_ADDED core ./redaxo/include/functions/function_rex_structure.inc.php #L482
ART_CONTENT_UPDATED core ./redaxo/include/pages/content.inc.php #L337
ART_DELETED core ./redaxo/include/functions/function_rex_structure.inc.php #L615
ART_INIT core ./redaxo/include/classes/class.rex_article_base.inc.php #L62
ART_META_FORM core ./redaxo/include/pages/content.inc.php #L836
ART_META_FORM_SECTION core ./redaxo/include/pages/content.inc.php #L854
ART_META_UPDATED core ./redaxo/include/pages/content.inc.php #L598
ART_PRE_DELETED core ./redaxo/include/functions/function_rex_generate.inc.php #L369
ART_STATUS core ./redaxo/include/functions/function_rex_structure.inc.php #L682
ART_STATUS_TYPES core ./redaxo/include/functions/function_rex_structure.inc.php #L723
ART_TO_CAT core ./redaxo/include/functions/function_rex_content.inc.php #L434
ART_TO_STARTPAGE core ./redaxo/include/functions/function_rex_content.inc.php #L386
ART_UPDATED core ./redaxo/include/functions/function_rex_structure.inc.php #L557
BE_STYLE_PAGE_CONTENT be_style ./redaxo/include/addons/be_style/pages/index.inc.php #L8
CAT_ADDED core ./redaxo/include/functions/function_rex_structure.inc.php #L106
CAT_DELETED core ./redaxo/include/functions/function_rex_structure.inc.php #L287
CAT_FORM_ADD core ./redaxo/include/pages/structure.inc.php #L310
CAT_FORM_BUTTONS core ./redaxo/include/pages/structure.inc.php #L350
CAT_FORM_EDIT core ./redaxo/include/pages/structure.inc.php #L370
CAT_STATUS core ./redaxo/include/functions/function_rex_structure.inc.php #L359
CAT_STATUS_TYPES core ./redaxo/include/functions/function_rex_structure.inc.php #L400
CAT_TO_ART core ./redaxo/include/functions/function_rex_content.inc.php #L485
CAT_UPDATED core ./redaxo/include/functions/function_rex_structure.inc.php #L212
CLANG_ADDED core ./redaxo/include/functions/function_rex_generate.inc.php #L1064
CLANG_ARTICLE_GENERATED core ./redaxo/include/functions/function_rex_generate.inc.php #L278
CLANG_DELETED core ./redaxo/include/functions/function_rex_generate.inc.php #L999
CLANG_UPDATED core ./redaxo/include/functions/function_rex_generate.inc.php #L1091
CRONJOB_TYPES cronjob ./redaxo/include/addons/cronjob/classes/class.manager.inc.php #L127
DASHBOARD_COMPONENT be_dashboard ./redaxo/include/addons/be_dashboard/pages/index.inc.php #L34
DASHBOARD_COMPONENT_ACTIONS be_dashboard ./redaxo/include/addons/be_dashboard/classes/class.component_base.inc.php #L120
DASHBOARD_NOTIFICATION be_dashboard ./redaxo/include/addons/be_dashboard/classes/class.notification_component.inc.php #L28
GENERATE_FILTER core ./redaxo/include/functions/function_rex_generate.inc.php #L220
IMAGE_ERROR_SEND image_manager ./redaxo/include/addons/image_manager/classes/class.rex_image.inc.php #L220
IMAGE_MANAGER_FILTERSET image_manager ./redaxo/include/addons/image_manager/classes/class.rex_image_manager.inc.php #L31
IMAGE_MANAGER_INIT image_manager ./redaxo/include/addons/image_manager/config.inc.php #L68
IMAGE_SEND image_manager ./redaxo/include/addons/image_manager/classes/class.rex_image.inc.php #L158
MEDIA_ADDED core ./redaxo/include/pages/mediapool.upload.inc.php #L36
MEDIA_FORM_ADD core ./redaxo/include/functions/function_rex_mediapool.inc.php #L463
MEDIA_FORM_EDIT core ./redaxo/include/pages/mediapool.media.inc.php #L332
MEDIA_LIST_FUNCTIONS core ./redaxo/include/pages/mediapool.media.inc.php #L768
MEDIA_LIST_QUERY core ./redaxo/include/pages/mediapool.media.inc.php #L645
MEDIA_LIST_TOOLBAR core ./redaxo/include/pages/mediapool.media.inc.php #L83
MEDIA_UPDATED core ./redaxo/include/pages/mediapool.media.inc.php #L159
META_NAVI core ./redaxo/include/layout/top.php #L105
OOMEDIA_IS_IN_USE core ./redaxo/include/classes/class.oomedia.inc.php #L652
OUTPUT_FILTER core ./redaxo/include/functions/function_rex_client_cache.inc.php #L83
OUTPUT_FILTER_CACHE core ./redaxo/include/functions/function_rex_client_cache.inc.php #L86
PAGE_BODY_ATTR core ./redaxo/include/layout/top.php #L74
PAGE_CONTENT_CTYPE_MENU core ./redaxo/include/pages/content.inc.php #L643
PAGE_CONTENT_HEADER core ./redaxo/include/pages/content.inc.php #L101
PAGE_CONTENT_MENU core ./redaxo/include/pages/content.inc.php #L692
PAGE_CONTENT_OUTPUT core ./redaxo/include/pages/content.inc.php #L732
PAGE_HEADER core ./redaxo/include/layout/top.php #L73
PAGE_MEDIAPOOL_HEADER core ./redaxo/include/pages/mediapool.media.inc.php #L32
PAGE_MEDIAPOOL_MENU core ./redaxo/include/pages/mediapool.inc.php #L100
PAGE_MEDIAPOOL_OUTPUT core ./redaxo/include/pages/mediapool.inc.php #L213
PAGE_SPECIALS_OUTPUT core ./redaxo/include/pages/specials.inc.php #L17
PAGE_STRUCTURE_HEADER core ./redaxo/include/pages/structure.inc.php #L195
PAGE_TITLE core ./redaxo/include/functions/function_rex_title.inc.php #L76
PAGE_TITLE_SHOWN core ./redaxo/include/functions/function_rex_title.inc.php #L90
REX_BE_NAVI_CLASSNAME core ./redaxo/include/classes/class.rex_navigation.inc.php #L405
REX_FORM_CLASSNAME core ./redaxo/include/classes/class.rex_form.inc.php #L109
REX_FORM_CONTROL_FIElDS core ./redaxo/include/classes/class.rex_form.inc.php #L144
REX_FORM_DELETED core ./redaxo/include/classes/class.rex_form.inc.php #L1111
REX_FORM_INPUT_ATTRIBUTES core ./redaxo/include/classes/class.rex_form.inc.php #L684
REX_FORM_INPUT_CLASS core ./redaxo/include/classes/class.rex_form.inc.php #L630
REX_FORM_INPUT_TAG core ./redaxo/include/classes/class.rex_form.inc.php #L660
REX_FORM_SAVED core ./redaxo/include/classes/class.rex_form.inc.php #L1093
REX_LIST_CLASSNAME core ./redaxo/include/classes/class.rex_list.inc.php #L155
REX_NAVI_CLASSNAME core ./redaxo/include/classes/class.rex_navigation.inc.php #L61
REX_SQL_CLASSNAME core ./redaxo/include/classes/class.rex_sql.inc.php #L848
SLICE_ADDED core ./redaxo/include/pages/content.inc.php #L274
SLICE_DELETED core ./redaxo/include/pages/content.inc.php #L306
SLICE_UPDATED core ./redaxo/include/pages/content.inc.php #L240
URL_REWRITE core ./redaxo/include/functions/function_rex_url.inc.php #L106
URL_REWRITE_ARTICLE_ID_NOT_FOUND url_rewrite ./redaxo/include/addons/url_rewrite/classes/class.rewrite_fullnames.inc.php #L175

$xform->objparams[…]

Array-Key Type Content
['answertext'] STRING
['submit_btn_label'] STRING
['submit_btn_show'] BOOL
['actions']
['error_class'] STRING
['unique_error']
['unique_field_warning'] STRING
['article_id'] INT
['clang'] INT
['real_field_names'] BOOL
['form_method'] STRING 'post'
['form_action'] STRING form action URL
['form_anchor']
['form_showformafterupdate'] INT (0/1)
['form_show'] BOOL
['form_name'] STRING
['form_id'] STRING
['form_wrap'] ARRAY – form wrapper html
['actions_executed'] BOOL
['postactions_executed'] BOOL
['Error-occured']
['Error-Code-EntryNotFound'] STRING 'ErrorCode – EntryNotFound'
['Error-Code-InsertQueryError'] STRING 'ErrorCode – InsertQueryError'
['getdata'] BOOL
['object_path'] STRING – xform classpath
['debug'] BOOL
['form_data'] STRING – piped form definition
['output'] STRING – resulting form html
['main_where'] STRING
['main_id'] -1
['main_table'] STRING
['form_hiddenfields']['article_id'] INT
['form_hiddenfields']['clang'] INT
['form_hiddenfields']['FORM[formular][send]'] INT
['warning']
['warning_messages'] ARRAY
['fieldsets_opened'] INT
['form_elements'] ARRAY exploded elements from piped input
['form_output'] ARRAY html form elements
['value_pool']['email'] ARRAY form values
['value_pool']['sql'] ARRAY form values for sql
['value']
['validate']
['action']
['this'] OBJ Recursion (rex_xform)
['send'] INT (0/1)

XFORM ExtensionPoints

ExtensionPoint Core/Addon::Plugin File #Line
REX_XFORM_SAVED xform ./redaxo/include/addons/xform/classes/action/class.xform.action_db.inc.php #L65
XFORM_DATA_ADD xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L381
XFORM_DATA_ADDED xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L397
XFORM_DATA_DATASET_DELETE xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L194
XFORM_DATA_DATASET_DELETED xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L202
XFORM_DATA_DELETE xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L175
XFORM_DATA_DELETED xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L184
XFORM_DATA_FORM xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L426
XFORM_DATA_LIST xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L615
XFORM_DATA_LIST_SQL xform::manager ./redaxo/include/addons/xform/plugins/manager/classes/basic/class.rex_xform_manager.inc.php #L140
XFORM_DATA_TABLE_TRUNCATE xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L210
XFORM_DATA_TABLE_TRUNCATED xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L218
XFORM_DATA_UPDATE xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L377
XFORM_DATA_UPDATED xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L392
XFORM_EMAIL_BEFORE_REPLACEVARS xform::email ./redaxo/include/addons/xform/plugins/email/classes/basic/class.rex_xform_emailtemplate.inc.php #L24
XFORM_EMAIL_BEFORE_SEND xform::email ./redaxo/include/addons/xform/plugins/email/classes/basic/class.rex_xform_emailtemplate.inc.php #L67
XFORM_EMAIL_SENT xform::email ./redaxo/include/addons/xform/plugins/email/classes/basic/class.rex_xform_emailtemplate.inc.php #L106
XFORM_EMAIL_SENT_FAILED xform::email ./redaxo/include/addons/xform/plugins/email/classes/basic/class.rex_xform_emailtemplate.inc.php #L112
XFORM_MANAGER_DATA_EDIT_FUNC xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L69
XFORM_MANAGER_REX_INFO xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/data_edit.inc.php #L61
XFORM_MANAGER_TABLE_FIELD_FUNC xform::manager ./redaxo/include/addons/xform/plugins/manager/inc/table_field.inc.php #L473

API Doku

Redaxo DB schema