InfoBoxRepositoryWriter
in package
implements
InfoBoxRepositoryWriterInterface
Class InfoBoxWriter
Tags
Interfaces, Classes and Traits
- InfoBoxRepositoryWriterInterface
- Interface InfoBoxWriterInterface
Table of Contents
- $dateTimeFormat : string
- Formatting pattern for date time values.
- $db : CI_DB_query_builder
- Database connection.
- $id_column : string
- Name of the ID column.
- $infoBoxTable : string
- Name of the table for the info box messages entries.
- $infoBoxTableDescription : string
- Name of the table for the info box description entries.
- $languageProvider : LanguageProvider
- Language provider.
- $reactivationTimeLimit : int
- Info box item reactivation time limit.
- __construct() : mixed
- Constructor of the class InfoBoxWriter.
- reactivate() : mixed
- Reactivates all messages.
- setStatus() : mixed
- Updates a message status.
- write() : mixed
- Adds a new message.
Properties
$dateTimeFormat
Formatting pattern for date time values.
protected
string
$dateTimeFormat
= 'Y-m-d H:i:s'
$db
Database connection.
protected
CI_DB_query_builder
$db
$id_column
Name of the ID column.
protected
string
$id_column
= 'infobox_messages_id'
$infoBoxTable
Name of the table for the info box messages entries.
protected
string
$infoBoxTable
= 'infobox_messages'
$infoBoxTableDescription
Name of the table for the info box description entries.
protected
string
$infoBoxTableDescription
= 'infobox_messages_description'
$languageProvider
Language provider.
protected
LanguageProvider
$languageProvider
$reactivationTimeLimit
Info box item reactivation time limit.
protected
int
$reactivationTimeLimit
= 604800
Default value is 604800 which equals 1 week.
Methods
__construct()
Constructor of the class InfoBoxWriter.
public
__construct(CI_DB_query_builder $db) : mixed
Parameters
- $db : CI_DB_query_builder
-
Query builder.
Return values
mixed —reactivate()
Reactivates all messages.
public
reactivate() : mixed
Return values
mixed —setStatus()
Updates a message status.
public
setStatus(IdType $id, StringType $status) : mixed
Parameters
- $id : IdType
-
Message ID.
- $status : StringType
-
Message status to set.
Return values
mixed —write()
Adds a new message.
public
write(InfoBoxMessage $message) : mixed
Parameters
- $message : InfoBoxMessage
-
Info box message to save.