Summary
- File
- Package hierarchy PHPBoost\Event
- Class hierarchy \Event \Contribution
This class represents a contribution made by a user to complete the content of the website.
All the contributions are managed in the contribution panel.
This class represents a contribution made by a user to complete the content of the website.
All the contributions are managed in the contribution panel.
__construct()
Builds a Contribution object.
None found |
set_id(integer $id)
Sets the id of the event. The id is the corresponding data base entry one.
integer | $id | Id of the event. |
None found |
set_entitled(string $entitled)
Sets the entitled of the event. The entitled can be considered as the name, it must be explicit.
string | $entitled | The event entitiled. |
None found |
set_fixing_url(string $fixing_url)
Sets the URL corresponding to the event. For the contributions and the administrator alerts it's the number URL at which the problem can be solved.
string | $fixing_url | Relative URL (the first character must be / for the root of the site). |
None found |
set_status(integer $new_current_status)
Set the status of the contribution.
integer | $new_current_status | One of those elements:
|
None found |
set_creation_date(\Date $date)
Sets the creation date of the event.
\Date | $date | The creation date |
None found |
set_id_in_module(integer $id)
Sets the id in module parameter. It corresponds to the id of the element corresponding to the event in your data base tables.
For example, il you use the events to allow user to purpose some news in your web site, it will be the id of the news added.
integer | $id | Id in the module |
None found |
set_identifier(string $identifier)
Sets the event identifier. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier.
It's that identifier which can be used to filter the events. You don't have to use it, you can let it blank.
string | $identifier | Identifier of the event. |
None found |
set_type(string $type)
Sets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.
string | $type | The type of your event. |
None found |
set_must_regenerate_cache(boolean $must)
Sets a private property indicating if the changes made on this event imply the regeneration of the events cache.
boolean | $must | true if we must generate the events cache, otherwise false. |
None found |
get_id() : integer
Gets the id of the event (in the event data base).
The id.
None found |
get_entitled() : string
Returns the entitled of the event.
The entitled.
None found |
get_fixing_url() : string
Returns the URL corresponding to the alert.
Relative URL whose first character is / for the website root.
None found |
get_status() : integer
Gets the status of the event. The status is one of those elements: ul> <li>Event::EVENT_STATUS_UNREAD if it's not read.</li> <li>Event::EVENT_STATUS_BEING_PROCESSED if the event is beeing processed</li> <li>Event::EVENT_STATUS_PROCESSED if the event is processed.
Status
None found |
get_creation_date() : \Date
Returns the creation date of the event.
Creation date
None found |
get_id_in_module() : integer
Gets the id in the module. This value corresponds to the id of the daba base entry associated to the event.
The id in the module.
None found |
get_identifier() : string
Gets the identifier of the event. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier.
It's that identifier which can be used to filter the events.
The identifier of the event.
None found |
get_type() : string
Gets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.
The type.
None found |
get_must_regenerate_cache() : boolean
Gets the value indicating if the cache must be generated.
true if the cache has to be generated, false else.
None found |
get_status_name() : string
Gets the contribution status name. It's automatically translated in the user language, ready to be displayed.
The status name.
None found |
build_event(integer $id, string $entitled, string $fixing_url, integer $current_status, \Date $creation_date, integer $id_in_module, string $identifier, string $type)
Builds an event object from its whole parameters.
integer | $id | The event id. |
string | $entitled | The event entitled. |
string | $fixing_url | The URL corresponding to the event. |
integer | $current_status | The event status. |
\Date | $creation_date | The creation date. |
integer | $id_in_module | The id of the object associated to the event. |
string | $identifier | The event identifier. |
string | $type | The event type. |
None found |
build(integer $id, string $entitled, $description, string $fixing_url, string $module, $status, \Date $creation_date, \Date $fixing_date, array<mixed,mixed> $auth, integer $poster_id, integer $fixer_id, integer $id_in_module, string $identifier, string $type, string $poster_login = '', string $fixer_login = '', $poster_level = '', $fixer_level = '', $poster_groups = '', $fixer_groups = '')
Builds a contribution object from its whole parameters.
integer | $id | Contribution id. |
string | $entitled | Contribution entitled. |
$description | ||
string | $fixing_url | URL associated to the event. |
string | $module | Module identifier at which the contribution is attached. |
$status | ||
\Date | $creation_date | Contribution creation date. |
\Date | $fixing_date | Contribution fixing date. |
array<mixed,mixed> | $auth | Auth array determining the people who can treat the contribution. |
integer | $poster_id | Contribution creator id. |
integer | $fixer_id | Contribution fixer id. |
integer | $id_in_module | Id of the element associated to the contribution. |
string | $identifier | Contribution identifier. |
string | $type | Contribution type. |
string | $poster_login | Login of the poster of the contribution. |
string | $fixer_login | Login of the fixer of the contribution. |
$poster_level | ||
$fixer_level | ||
$poster_groups | ||
$fixer_groups |
None found |
set_module(string $module)
Sets the module in which the contribution is used.
string | $module | Module identifier (for example the name of the module folder). |
None found |
set_fixing_date(\Date $date)
Sets the fixing date.
\Date | $date | Date |
None found |
set_auth(array<mixed,mixed> $auth)
Sets the authorization of the contribution. It will determine who will be able to treat the contribution.
array<mixed,mixed> | $auth | Auth array. |
None found |
set_poster_id(integer $poster_id)
Sets the id of the poster.
integer | $poster_id | Id. |
None found |
set_fixer_id(integer $fixer_id)
Sets the id of the fixer.
integer | $fixer_id | Id. |
None found |
set_description(string $description)
Sets the description of the contribution.
string | $description | Description (can be some HTML content). |
None found |
get_description() : string
Gets the description of the contribution.
the description
None found |
get_module() : string
Gets the module in which the contribution is used.
The module identifier (for example the name of its folder).
None found |
get_fixing_date() : \The
Gets the contribution fixing date.
date at which the contribution has been treated.
None found |
get_auth() : array<mixed,mixed>
Gets the authorization of treatment of this contribution.
The authorization array.
None found |
get_poster_id() : integer
Gets the identifier of the poster.
Its id.
None found |
get_fixer_id() : integer
Gets the identifier of the fixer.
Its id.
None found |
get_poster_login() : string
Gets the poster login.
The poster login.
None found |
get_fixer_login() : string
Gets the fixer login.
The fixer login.
None found |
get_poster_level() : string
Gets the poster level.
The poster level.
None found |
get_fixer_level() : string
Gets the fixer level.
The fixer level.
None found |
get_poster_groups() : string
Gets the poster groups.
The poster groups.
None found |
get_fixer_groups() : string
Gets the fixer groups.
The fixer groups.
None found |
get_module_name() : string
Gets the name of the module in which the contribution is used.
The module name.
None found |
$id :
protected |
int Numerical identifier of the event (in DB). |
$entitled :
protected |
string Entitled (title or name) of the event. |
$fixing_url :
protected |
string URL where you can process the event (relative from the website root). |
$current_status :
protected |
int The event status. |
$creation_date :
protected |
Date The event creation date. |
$id_in_module :
protected |
int Id corresponding to the event in the module (optionnal). |
$identifier :
protected |
string Identifier to recognize the entry (optionnal). |
$type :
protected |
string Event type (optionnal). |
$must_regenerate_cache :
protected |
bool To know if the modifications implies to regenerate the cache (for instance whether the status has been changed). |
$description : string
None found |
$module : string
None found |
$fixing_date : \Date
None found |
$auth : array
None found |
$poster_id : integer
None found |
$fixer_id : integer
None found |
$poster_login : string
None found |
$fixer_login : string
None found |
$poster_level : string
None found |
$fixer_level : string
None found |
$poster_groups : string
None found |
$fixer_groups : string
None found |
EVENT_STATUS_UNREAD = 0
None found |
EVENT_STATUS_BEING_PROCESSED = 1
None found |
EVENT_STATUS_PROCESSED = 2
None found |
CONTRIBUTION_AUTH_BIT = 1
None found |