Property | Type | Description | |
---|---|---|---|
$auth | phpbb\auth\auth | Auth object | |
$db | phpbb\db\driver\driver | Database object | |
$disabled_types | array | An array with the disabled log types. Logs of such types will not be added when add() is called. | |
$dispatcher | phpbb\event\dispatcher_interface | Event dispatcher object | |
$entry_count | integer | Keeps the total log count of the last call to get_logs() | |
$is_in_admin | boolean | If set, administrative user profile links will be returned and messages will not be censored. | |
$last_page_offset | integer | Keeps the offset of the last valid page of the last call to get_logs() | |
$log_table | string | The table we use to store our logs. | |
$php_ext | string | PHP Extension | |
$phpbb_admin_path | string | Admin root path | |
$phpbb_root_path | string | phpBB root path | |
$user | phpbb\user | User object |
Method | Description | |
---|---|---|
__construct ( phpbb\db\driver\driver_interface $db, phpbb\user $user, phpbb\auth\auth $auth, phpbb\event\dispatcher_interface $phpbb_dispatcher, string $phpbb_root_path, string $relative_admin_path, string $php_ext, string $log_table ) | Constructor | |
add ( $mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = [] ) | {@inheritDoc} | |
delete ( $mode, $conditions = [] ) | {@inheritDoc} | |
disable ( $type = '' ) | {@inheritDoc} | |
enable ( $type = '' ) | {@inheritDoc} | |
get_is_admin ( ) : boolean | Returns the is_in_admin option | |
get_log_count ( ) | {@inheritDoc} | |
get_logs ( $mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '' ) | {@inheritDoc} | |
get_valid_offset ( ) | {@inheritDoc} | |
is_enabled ( $type = '' ) | {@inheritDoc} | |
set_is_admin ( boolean $is_in_admin ) : null | Set is_in_admin in order to return administrative user profile links in get_logs() | |
set_log_table ( string $log_table ) : null | Set table name |
Method | Description | |
---|---|---|
generate_sql_keyword ( string $keywords, string $table_alias = 'l.', string $statement_operator = 'AND' ) : string | Generates a sql condition for the specified keywords | |
get_reportee_data ( array $reportee_ids ) : array | Get the data for all reportee from the database | |
get_topic_auth ( array $topic_ids ) : array | Determine whether the user is allowed to read and/or moderate the forum of the topic |
public __construct ( phpbb\db\driver\driver_interface $db, phpbb\user $user, phpbb\auth\auth $auth, phpbb\event\dispatcher_interface $phpbb_dispatcher, string $phpbb_root_path, string $relative_admin_path, string $php_ext, string $log_table ) | ||
$db | phpbb\db\driver\driver_interface | Database object |
$user | phpbb\user | User object |
$auth | phpbb\auth\auth | Auth object |
$phpbb_dispatcher | phpbb\event\dispatcher_interface | Event dispatcher |
$phpbb_root_path | string | Root path |
$relative_admin_path | string | Relative admin root path |
$php_ext | string | PHP Extension |
$log_table | string | Name of the table we use to store our logs |
public add ( $mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = [] ) |
protected generate_sql_keyword ( string $keywords, string $table_alias = 'l.', string $statement_operator = 'AND' ) : string | ||
$keywords | string | The keywords the user specified to search for |
$table_alias | string | The alias of the logs' table ('l.' by default) |
$statement_operator | string | The operator used to prefix the statement ('AND' by default) |
return | string | Returns the SQL condition searching for the keywords |
public get_is_admin ( ) : boolean | ||
return | boolean |
public get_logs ( $mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '' ) |
protected get_reportee_data ( array $reportee_ids ) : array | ||
$reportee_ids | array | Array with the user ids of the reportees |
return | array | Returns an array with the reportee data |
protected get_topic_auth ( array $topic_ids ) : array | ||
$topic_ids | array | Array with the topic ids |
return | array | Returns an array with two keys 'm_' and 'read_f' which are also an array of topic_id => forum_id sets when the permissions are given. Sample: array( 'permission' => array( topic_id => forum_id ), ), |
public set_is_admin ( boolean $is_in_admin ) : null | ||
$is_in_admin | boolean | Are we called from within the acp? |
return | null |
public set_log_table ( string $log_table ) : null | ||
$log_table | string | Can overwrite the table to use for the logs |
return | null |
protected driver,phpbb\db\driver $db | ||
return | phpbb\db\driver\driver |
protected array $disabled_types | ||
return | array |
protected dispatcher_interface,phpbb\event $dispatcher | ||
return | phpbb\event\dispatcher_interface |
protected int $entry_count | ||
return | integer |
protected bool $is_in_admin | ||
return | boolean |
protected int $last_page_offset | ||
return | integer |
protected string $log_table | ||
return | string |
protected string $phpbb_admin_path | ||
return | string |
protected string $phpbb_root_path | ||
return | string |