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 |
---|
string
Message identifier; must be unique
string
Message content
integer
Message 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
integer
Message 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
array
Settings 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
array
Additional 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 |
---|
string
Message identifier; must be unique
string
Message content
integer
Message 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
integer
Message 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
array
Additional 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 |
---|
string
Message identifier
boolean
Message exists (true) or not (false)checkMessageClosed(string $id) : boolean
access | public |
---|
string
Message identifier
boolean
Message is closed (true) or not (false)checkMessagePermissions(string $id) : boolean
access | public |
---|
string
Message identifier
boolean
Permission to display this message are correct (true) or not (false)checkMessageToDisplay(string $id) : boolean
access | public |
---|
string
Message identifier
boolean
Message will be displayed (true) or not (false)closeMessage(string $id) : void
access | public |
---|
string
Message identifier
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 componentgetMessage(string $id) : array | boolean
access | public |
---|
string
Message identifier
array
boolean
Message 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 |
---|
array
Messages 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 |
---|
string
Option name for closed messagegetProjectObj() : 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 componentremoveMessage(string $id) : void
access | public |
---|
string
Message identifier
restoreClosedMessage(string $id) : void
access | public |
---|
string
Message identifier
addMessageForProjectOrAllPages(string $id, string $content, integer $type, integer $closable, boolean $allPages, array $pages, array $attr) : void
access | private |
---|
string
Message identifier; must be unique
string
Message content
integer
Message 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)
integer
Message 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)
boolean
Message will be displayed on all pages in administration panel (true) or not (false)
array
Settings 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
array
Additional 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 |
---|