access |
public |
package |
kocuj_internal_lib |
inherited_from |
\KocujIL\V12a\Classes\ComponentObject |
Methods
Constructor
__construct(object $projectObj) : void
Inherited
Parameters
$projectObj
object
\KocujIL\V12a\Classes\Project object for current project
Action for preparing update message
actionAdminInit() : void
Add message for update from the selected version
addUpdateMessage(string $fromVersion, string $message, integer $useTopMessage = \KocujIL\V12a\Enums\Project\Components\Backend\UpdateMessage\UseTopMessage::NO
) : void
Parameters
$fromVersion
string
Version from which update will show message; it can be only fragment of version number, but then it must be ended with dot character ("."), for example, "1.", "1.0.", etc.
$message
string
Message to display
$useTopMessage
integer
Use top message with link to message to display or just show message; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\UpdateMessage\UseTopMessage: NO (when display just show message) or YES (when display top message with link to message to display) - default: \KocujIL\V12a\Enums\Project\Components\Backend\UpdateMessage\UseTopMessage::NO
Check if message for update from the selected version exists
checkMessage(string $fromVersion) : boolean
Parameters
$fromVersion
string
Version from which update will show message
Returns
boolean
Message for update from the selected version exists (true) or not (false)
Check top message for update from the selected version
checkTopMessage(string $fromVersion) : boolean
Parameters
$fromVersion
string
Version from which update will show message
Returns
boolean
Top message for the selected version exists (true) or not (false)
Get object of class type from component
getComponent(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE
, string $fragment = ''
) : object
Inherited
Parameters
$type
string
Component type
$projectCategory
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
$fragment
string
Component fragment - default: empty
Returns
object
Object of class type from component
Get version for last update message from database
getLastUpdateMessageVersionOptionValue() : string
Returns
string
Version for last update message from database
Get message for update from the selected version
getMessage(string $fromVersion) : boolean | string
Parameters
$fromVersion
string
Version from which update will show message
Returns
boolean
string
Message for the selected version or false if not exists
Get messages for update data
getMessagesForUpdate() : array
Returns
array
Messages for update data; each message for update data has the following fields: "message" (string type; update message), "usetopmessage" (int type; if set to \KocujIL\V12a\Enums\Project\Components\Backend\UpdateMessage\UseTopMessage::YES, top message will be displayed with link to update message)
Get option name for version for last update message
getOptionNameLastUpdateMessageVersion() : string
Static
Returns
string
Option name for version for last update message
Get object of type \KocujIL\V12a\Classes\Project
getProjectObj() : object
Inherited
Returns
object
Object of type \KocujIL\V12a\Classes\Project
Get object of class type for strings from component
getStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE
) : object
Inherited
Parameters
$type
string
Component type
$projectCategory
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
Returns
object
Object of class type for strings from component
Remove message for update
removeMessageForUpdate(string $fromVersion) : void
Parameters
$fromVersion
string
Version from which update will show message
Set dividing string for multiple message for one version update
setDivideString(string $divideString) : void
Parameters
$divideString
string
Dividing string
Get message or top message for update from the selected version
getMessageOrTopMessage(boolean $isMessage, string $fromVersion) : boolean | integer | string
Parameters
$isMessage
boolean
Message will be returned (true) or top message (false)
$fromVersion
string
Version from which update will show message
Returns
boolean
integer
string
Message text or check top message for the selected version or false if not exists
Properties
Dividing string for multiple messages for one version update
$divideString : string
Message will be displayed (true) or not (false)
$messageDisplay : boolean
\KocujIL\V12a\Classes\Project object for current project
$projectObj : object
Top message will be displayed (true) or not (false)
$topMessageDisplay : boolean
Update messages
$updateMessage : array