Settings fields class
| access | public |
|---|---|
| package | kocuj_internal_lib |
| inherited_from | \KocujIL\V12a\Classes\ComponentObject |
__construct(object $projectObj) : void
| access | public |
|---|---|
| inherited_from | \KocujIL\V12a\Classes\ComponentObject::__construct() |
object\KocujIL\V12a\Classes\Project object for current project
__construct(object $projectObj) : void
| access | public |
|---|
object\KocujIL\V12a\Classes\Project object for current project
actionFieldsHeaders() : void
| access | public |
|---|
addFieldTypeForCurrentSite($fieldType) : void
| todo | throw an error \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\ExceptionCode::WRONG_ACTION_FOR_METHOD when this method is executed after "current_screen" action |
|---|---|
| access | public |
addType(string $type, array|string $callbackDisplay, array|string $callbackHeader= NULL, integer $allowInWidget= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\AllowInWidget::NO, integer $orderInWidget= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget::FIRST_LABEL) : void
| access | public |
|---|
stringField type
arraystringCallback function or method name for displaying field; can be global function or method from any class
arraystringCallback function or method name for header on site with field; can be global function or method from any class - default: NULL
integerField type is allowed in widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\AllowInWidget: NO (field type is not allowed in widget) or YES (field type is allowed in widget) - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\AllowInWidget::NO
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element) or FIRST_ELEMENT (first element, then label) - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget::FIRST_LABEL
checkType(string $id) : boolean
| access | public |
|---|
stringField type identifier
booleanField exists (true) or not (false)getComponent(string $type, integer $projectCategory= \KocujIL\V12a\Enums\ProjectCategory::CORE, string $fragment= '') : object
| access | public |
|---|
stringComponent type
integerComponent category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE
stringComponent fragment - default: empty
objectObject of class type from componentgetField(string $fieldType, string $fieldId, string $fieldHtmlId, string $fieldValue, string $tipText= '', array $classAndStyle= array(), integer $fieldForWidget= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget::NO, integer $optionArray= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray::NO, array $events= array(), array $additional= array()) : string
| access | public |
|---|
stringField type
stringField identifier
stringField HTML id; if empty, HTML id will be the same as $fieldId
stringField value
stringTooltip text - default: empty
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before) - default: empty
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget) - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget::NO
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option) - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray::NO
arrayHTML events - default: empty
arrayAdditional settings; each field type can use different additional settings; there are the following additional settings which can be always used: "global_addinfo" (string type; text to add below field), "global_widgetobj" (object type; it must be set to widget object, when $fieldForWidget is set to \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget::YES)
stringFieldgetProjectObj() : object
| access | public |
|---|
objectObject of type \KocujIL\V12a\Classes\ProjectgetStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE) : object
| access | public |
|---|
stringComponent type
integerComponent category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE
objectObject of class type for strings from componentgetType(string $id) : array | boolean
| access | public |
|---|
stringField type identifier
arraybooleanField type data or false if not exists; field type data have the following fields: "allowinwidget" (int type; field type is allowed in widget or not), "callbackdisplay" (array or string type; callback to function or method which will display this field), "callbackheader" (array or string type; callback to function or method which will add header for field), "orderinwidget" (int type; order of label and HTML element in widget)getTypes() : array
| access | public |
|---|
arrayFields types data; each field type data has the following fields: "allowinwidget" (int type; field type is allowed in widget or not), "callbackdisplay" (array or string type; callback to function or method which will display this field), "callbackheader" (array or string type; callback to function or method which will add header for field), "orderinwidget" (int type; order of label and HTML element in widget)removeType(string $id) : void
| access | public |
|---|
stringField type identifier
fieldButton(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings; there are the following additional settings which can be used: "buttonlabel" (string type; label for button), "buttonprimary" (bool type; if it is set to true, it will be a primary button with different appearance than others)
stringFieldfieldCheckbox(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings; there are the following additional settings which can be used: "checkedvalue" (string type; value which will be used for checked checkbox; if empty or does not exist, "1" will be used)
stringFieldfieldHeaderImage(object $componentObj) : void
| access | private |
|---|
objectComponent object
fieldHidden(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings
stringFieldfieldImage(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings; there are the following additional settings which can be used: "buttonlabel" (string type; label for button), "buttonprimary" (bool type; if it is set to true, it will be a primary button with different appearance than others)
stringFieldfieldSelect(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings; there are the following additional settings which can be used: "emptyoptionatbegin" (bool type; there will be an empty option at the beginning of options list), "options" (array type; options list; each array key will be an option value and each array value will be displayed text for option)
stringFieldfieldText(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings
stringFieldfieldTextDisabled(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings
stringFieldfieldTextarea(object $componentObj, string $fieldHtmlId, string $fieldHtmlName, string $fieldValue, string $fieldAttrs, string $tipText, array $classAndStyle, integer $fieldForWidget, integer $optionArray, integer $orderInWidget, array $additional) : string
| access | private |
|---|
objectComponent object
stringField HTML id
stringField HTML name
stringField value
stringPrepared text with field attributes "id", "name" and "title" and with space at beginning
stringTooltip text
arrayClass and style for element; class and style data must have the following fields: "all" (string type; HTML classes with "class" tag and HTML styles with "style" tag and space before), "class" (string type; HTML classes), "classwithtag" (string type; HTML classes with "class" tag and space before), "style" (string type; HTML styles), "stylewithtag" (string type; HTML styles with "style" tag and space before)
integerThis field is for widget or not; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\FieldForWidget: NO (when field is not for widget) or YES (when field is for widget)
integerOption is array or standard; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OptionArray: NO (when it is standard option) or YES (when it is array option)
integerLabel and HTML element order in widget; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsFields\OrderInWidget: FIRST_LABEL (first label, then element), FIRST_ELEMENT (first element, then label)
arrayAdditional settings
stringField$fieldsTypesForCurrentSite : array
array()| access | private |
|---|
$projectObj : object
NULL| access | private |
|---|
$types : array
array()| access | private |
|---|