|
| __construct ($type, $sub_type=NULL, $content_id=NULL, $content_title=NULL, $library_name=NULL, $library_version=NULL) |
| Adds event type, h5p library and timestamp to event before saving it.
|
|
|
const | LOG_ACTIONS = 2 |
|
const | LOG_ALL = 1 |
|
const | LOG_NONE = 0 |
|
|
static | $log_level = self::LOG_ACTIONS |
|
static | $log_time = 2592000 |
|
|
| getDataArray () |
| A helper which makes it easier for systems to save the data.
|
|
| getFormatArray () |
| A helper which makes it easier for systems to save the data.
|
|
| save () |
| Stores the event data in the database.
|
|
| saveStats () |
| Add current event data to statistics counter.
|
|
|
| $content_id |
|
| $content_title |
|
| $id |
|
| $library_name |
|
| $library_version |
|
| $sub_type |
|
| $time |
|
| $type |
|
◆ __construct()
H5PEventBase::__construct |
( |
| $type, |
|
|
| $sub_type = NULL, |
|
|
| $content_id = NULL, |
|
|
| $content_title = NULL, |
|
|
| $library_name = NULL, |
|
|
| $library_version = NULL ) |
Adds event type, h5p library and timestamp to event before saving it.
Common event types with sub type: content, <none> – content view embed – viewed through embed code shortcode – viewed through internal shortcode edit – opened in editor delete – deleted create – created through editor create upload – created through upload update – updated through editor update upload – updated through upload upgrade – upgraded
results, <none> – view own results content – view results for content set – new results inserted or updated
settings, <none> – settings page loaded
library, <none> – loaded in editor create – new library installed update – old library updated
- Parameters
-
string | $type | Name of event type |
string | $sub_type | Name of event sub type |
string | $content_id | Identifier for content affected by the event |
string | $content_title | Content title (makes it easier to know which content was deleted etc.) |
string | $library_name | Name of the library affected by the event |
string | $library_version | Library version |
◆ getDataArray()
H5PEventBase::getDataArray |
( |
| ) |
|
|
protected |
A helper which makes it easier for systems to save the data.
Add all relevant properties to a assoc. array. There are no NULL values. Empty string or 0 is used instead. Used by both Drupal and WordPress.
- Return values
-
◆ getFormatArray()
H5PEventBase::getFormatArray |
( |
| ) |
|
|
protected |
A helper which makes it easier for systems to save the data.
Used in WordPress.
- Return values
-
◆ save()
Stores the event data in the database.
Must be overridden by plugin.
◆ saveStats()
H5PEventBase::saveStats |
( |
| ) |
|
|
abstractprotected |
Add current event data to statistics counter.
Must be overridden by plugin.
The documentation for this class was generated from the following file:
- h5p/h5plib/v126/joubel/core/h5p-event-base.class.php