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 |
---|
string
Field type
array
string
Callback function or method name for displaying field; can be global function or method from any class
array
string
Callback function or method name for header on site with field; can be global function or method from any class - default: NULL
integer
Field 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
integer
Label 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 |
---|
string
Field type identifier
boolean
Field exists (true) or not (false)getComponent(string $type, integer $projectCategory= \KocujIL\V12a\Enums\ProjectCategory::CORE
, string $fragment= ''
) : object
access | public |
---|
string
Component type
integer
Component 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
string
Component fragment - default: empty
object
Object 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 |
---|
string
Field type
string
Field identifier
string
Field HTML id; if empty, HTML id will be the same as $fieldId
string
Field value
string
Tooltip text - default: empty
array
Class 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
integer
This 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
integer
Option 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
array
HTML events - default: empty
array
Additional 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)
string
FieldgetProjectObj() : object
access | public |
---|
object
Object of type \KocujIL\V12a\Classes\ProjectgetStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE
) : object
access | public |
---|
string
Component type
integer
Component 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
object
Object of class type for strings from componentgetType(string $id) : array | boolean
access | public |
---|
string
Field type identifier
array
boolean
Field 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 |
---|
array
Fields 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 |
---|
string
Field 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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional 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)
string
FieldfieldCheckbox(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional 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)
string
FieldfieldHeaderImage(object $componentObj) : void
access | private |
---|
object
Component 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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional settings
string
FieldfieldImage(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional 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)
string
FieldfieldSelect(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional 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)
string
FieldfieldText(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional settings
string
FieldfieldTextDisabled(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional settings
string
FieldfieldTextarea(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 |
---|
object
Component object
string
Field HTML id
string
Field HTML name
string
Field value
string
Prepared text with field attributes "id", "name" and "title" and with space at beginning
string
Tooltip text
array
Class 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)
integer
This 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)
integer
Option 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)
integer
Label 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)
array
Additional settings
string
Field$fieldsTypesForCurrentSite : array
array()
access | private |
---|
$projectObj : object
NULL
access | private |
---|
$types : array
array()
access | private |
---|