Notice
extends Basic
in package
Define system notice object
Tags
Table of Contents
- $ : string
- $ : string
- $ : string
- $ : string
- $ : string
- $dbal : NoticeDBAL|null
- The database abstraction layer buffer
- $ignore_hash_fields : array<string|int, mixed>
- $next : Notice|null
- __construct() : mixed
- Notice constructor.
- Assignee() : User|null
- Author() : User|null
- CreateExtra() : Result
- Create a new extra
- Delete() : Result|null
- Delete from database
- DeleteExtra() : Result
- Delete the extra
- FetchExtras() : Result
- Fetch extra list
- GetExtra() : Result
- Fetch single extra
- Hash() : string
- Generate hash of current contents
- Name() : string
- Get short content
- Next() : Notice|null
- Has and get next notice
- Save() : Result|null
- UpdateExtra() : Result
- Update the extra
- loadFromSrc() : void
- Fetch from db
- database() : NoticeDBAL|null
- Get the database instance
- extrasPath() : string
- Helper to get the extras path
- writeExtra() : Result
- Store extras
Properties
$
public
string
$
content The shortcut to the content
$
public
string
$
execute_at The end time for the notice
$
public
string
$
created_at The creation date
$
public
string
$
external_type The parent element type
$
public
string
$
external_id The parent element id
$dbal
The database abstraction layer buffer
protected
NoticeDBAL|null
$dbal
= null
$ignore_hash_fields
protected
array<string|int, mixed>
$ignore_hash_fields
= ['last_changed_by', 'last_changed_at']
$next
private
Notice|null
$next
= null
Methods
__construct()
Notice constructor.
public
__construct([string|null $id = null ][, null|string $language = null ]) : mixed
Parameters
- $id : string|null = null
-
The notice id
- $language : null|string = null
-
The local language or null
Return values
mixed —Assignee()
public
Assignee() : User|null
Return values
User|null —Author()
public
Author() : User|null
Return values
User|null —CreateExtra()
Create a new extra
public
CreateExtra(string $type, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
- $type : string
- $data : array<string|int, mixed>
- $individual : bool = true
Return values
Result —Delete()
Delete from database
public
Delete([false $skip = false ]) : Result|null
Parameters
- $skip : false = false
Return values
Result|null —DeleteExtra()
Delete the extra
public
DeleteExtra(string $type[, string|null $id = null ][, bool $individual = true ]) : Result
Parameters
- $type : string
-
The extras type
- $id : string|null = null
-
The id or null to drop all of certain kind
- $individual : bool = true
-
Is individual file or, in all full list?
Return values
Result —FetchExtras()
Fetch extra list
public
FetchExtras(string $type[, bool $individual = true ]) : Result
Parameters
- $type : string
- $individual : bool = true
Return values
Result —GetExtra()
Fetch single extra
public
GetExtra(string $type, string $id) : Result
Parameters
- $type : string
- $id : string
Return values
Result —Hash()
Generate hash of current contents
public
Hash() : string
Return values
string —Name()
Get short content
public
Name() : string
Return values
string —Next()
Has and get next notice
public
Next() : Notice|null
Return values
Notice|null —Save()
public
Save([false $force_new_id = false ]) : Result|null
Parameters
- $force_new_id : false = false
Return values
Result|null —UpdateExtra()
Update the extra
public
UpdateExtra(string $type, string $id, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
- $type : string
-
The extras type
- $id : string
-
The item primary key
- $data : array<string|int, mixed>
-
The new data
- $individual : bool = true
-
Is individual file or in all full list?
Return values
Result —loadFromSrc()
Fetch from db
protected
loadFromSrc() : void
Return values
void —database()
Get the database instance
private
database() : NoticeDBAL|null
Return values
NoticeDBAL|null —extrasPath()
Helper to get the extras path
private
extrasPath(string $type) : string
Parameters
- $type : string
Return values
string —writeExtra()
Store extras
private
writeExtra(string $file, array<string|int, mixed> $data[, bool $individual = true ]) : Result
Parameters
- $file : string
-
The target file
- $data : array<string|int, mixed>
-
The new row
- $individual : bool = true
-
Save in individual file?