Message class
| access | public |
|---|---|
| package | kocuj_internal_lib |
| inherited_from | \KocujIL\V12a\Classes\ComponentObject |
__construct(object $projectObj) : void
| access | public |
|---|
object\KocujIL\V12a\Classes\Project object for current project
actionAdminHead() : void
| access | public |
|---|
actionAdminNotices() : void
| access | public |
|---|
addMessage(string $id, string $content, integer $type= \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type::INFORMATION, integer $closable= \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable::NOT_CLOSABLE, array $pages= array(), array $attr= array()) : void
| access | public |
|---|
stringMessage identifier; must be unique
stringMessage content
integerMessage type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type: INFORMATION (for information message), WARNING (for warning message), ERROR (for error message) or SUCCESS (for success message) - default: \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type::INFORMATION
integerMessage closable status; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable: NOT_CLOSABLE (for message without closing button) or CLOSABLE (for message with closing button) - default: \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable::NOT_CLOSABLE
arraySettings pages list for current project where this message should be displayed; it should be identifiers from settings page for current project only; if it is empty, this message will be displayed on all settings pages for current project - default: empty
arrayAdditional attributes; there are available the following attributes: "class" (string type; CSS class for message div), "closecallback" (array or string type; if message is closable, it is callback executed during closing the message), "permissions" (array type; permissions for message to display; if empty, no permissions are required to display this message), "style" (string type; CSS style for message div) - default: empty
addMessageForAllPages(string $id, string $content, integer $type= \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type::INFORMATION, integer $closable= \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable::NOT_CLOSABLE, array $attr= array()) : void
| access | public |
|---|
stringMessage identifier; must be unique
stringMessage content
integerMessage type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type: INFORMATION (for information message), WARNING (for warning message), ERROR (for error message) or SUCCESS (for success message) - default: \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type::INFORMATION
integerMessage closable status; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable: NOT_CLOSABLE (for message without closing button) or CLOSABLE (for message with closing button) - default: \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable::NOT_CLOSABLE
arrayAdditional attributes; there are available the following attributes: "class" (string type; CSS class for message div), "closecallback" (array or string type; if message is closable, it is callback executed during closing the message), "permissions" (array type; permissions for message to display; if empty, no permissions are required to display this message), "style" (string type; CSS style for message div) - default: empty
checkMessage(string $id) : boolean
| access | public |
|---|
stringMessage identifier
booleanMessage exists (true) or not (false)checkMessageClosed(string $id) : boolean
| access | public |
|---|
stringMessage identifier
booleanMessage is closed (true) or not (false)checkMessagePermissions(string $id) : boolean
| access | public |
|---|
stringMessage identifier
booleanPermission to display this message are correct (true) or not (false)checkMessageToDisplay(string $id) : boolean
| access | public |
|---|
stringMessage identifier
booleanMessage will be displayed (true) or not (false)closeMessage(string $id) : void
| access | public |
|---|
stringMessage identifier
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 componentgetMessage(string $id) : array | boolean
| access | public |
|---|
stringMessage identifier
arraybooleanMessage data or false if not exists; message data have the following fields: "allpages" (if it is set to true, message will be displayed in all pages in administration panel), "closecallback" (array or string type; if message is closable, it is callback executed during closing the message), "class" (string type; CSS class for message div), "content" (content of message), "pages" (settings pages list for current project on which message is displayed or empty if it is displayed on all settings pages for current project), "permissions" (array type; permissions for message to display; if empty, no permissions are required to display this message), "style" (string type; CSS style for message div), "type" (type of message)getMessages() : array
| access | public |
|---|
arrayMessages data; each message data has the following fields: "allpages" (if it is set to true, message will be displayed in all pages in administration panel), "closecallback" (array or string type; if message is closable, it is callback executed during closing the message), "class" (string type; CSS class for message div), "content" (content of message), "pages" (settings pages list for current project on which message is displayed or empty if it is displayed on all settings pages for current project), "permissions" (array type; permissions for message to display; if empty, no permissions are required to display this message), "style" (string type; CSS style for message div), "type" (type of message)getOptionNameMessageClosed() : string
| access | public |
|---|
stringOption name for closed messagegetProjectObj() : 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 componentremoveMessage(string $id) : void
| access | public |
|---|
stringMessage identifier
restoreClosedMessage(string $id) : void
| access | public |
|---|
stringMessage identifier
addMessageForProjectOrAllPages(string $id, string $content, integer $type, integer $closable, boolean $allPages, array $pages, array $attr) : void
| access | private |
|---|
stringMessage identifier; must be unique
stringMessage content
integerMessage type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Type: INFORMATION (for information message), WARNING (for warning message), ERROR (for error message) or SUCCESS (for success message)
integerMessage closable status; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\Message\Closable: NOT_CLOSABLE (for message without closing button), CLOSABLE (for message with closing button and with saving information about closed message) or CLOSABLE_TEMPORARY (for message with closing button, but without saving information about closed message)
booleanMessage will be displayed on all pages in administration panel (true) or not (false)
arraySettings pages list for current project where this message should be displayed; it should be identifiers from settings page for current project only; if it is empty, this message will be displayed on all settings pages for current project
arrayAdditional attributes; there are available the following attributes: "class" (string type; CSS class for message div), "closecallback" (array or string type; if message is closable, it is callback executed during closing the message), "permissions" (array type; permissions for message to display; if empty, no permissions are required to display this message), "style" (string type; CSS style for message div)
$projectObj : object
NULL| access | private |
|---|