Procedural File: lib_admin_panel.php
Source Location: /_includes/lib_admin_panel.php
Classes:
AdminModule
Describes an module with admin functionality. The module defines actions that it's able perform and performs the action when needed. This class should be concidered abstract.
TableField
Describes a table field with a connected value in $_REQUEST. The table field tries to capture it's connected value if possible.
AdminAction
Describes an admin action, an identifier for something that can be done by the admin panel.
DeleteModule
Describes a module that deletes rows from a table.
EditModule
Describes a module that edits a specified row in a table.
AddModule
Describes a module for adding new rows to a table.
CallbackModule
Describes a module that uses callbacks to process events.
DetailsModule
Describes a module that shows read only contents of a specified row.
UpdateModule
Describes a module that sets specified fields to specified values when requested.
AdminPanel
Describes a panel itself. The panel itself is an module that shows an overview of a table and the available modules.
Page Details:
A library containing admin panel functionality. The library can create simplified and customized panels which can be used to alter database tables. The library is integrated with the administration log and update libraries.
Tags:
Includes:
convertBoolToYn [line 140]
string convertBoolToYn(
boolean $boolVal)
|
|
Converts a boolean value to either 'Yes' or 'No'. 'Yes' is used if the value is a boolean true, 'No' is used in all other cases.
Tags:
Parameters
| boolean |
$boolVal |
The boolean value that should be converted. |
formatTimestampDate [line 109]
string formatTimestampDate(
integer $timestamp)
|
|
Formats a timestamp into a date representation. As a special case timestamp equal to 0 get the representation 'Never'.
Tags:
Parameters
| integer |
$timestamp |
The unix timestamp to be converted. |
formatTimestampDays [line 87]
string formatTimestampDays(
integer $timestamp)
|
|
Formats a timestamp to the number of elapsed days since the point in time which the timestamp represents. This includes special cases like 'Never', 'Today' and 'Yesterday'.
Tags:
Parameters
| integer |
$timestamp |
The unix timestamp to be converted. |
formatTimestampTime [line 125]
string formatTimestampTime(
integer $timestamp)
|
|
Formats a timestamp into a date representation complete with hours and minutes. As a special case timestamp equal to 0 get the representation 'Never'.
Tags:
Parameters
| integer |
$timestamp |
The unix timestamp to be converted. |
logAdminAction [line 38]
void logAdminAction(
string $table, string $module, [string $comment = ''])
|
|
Adds an entry to the admin log, storing the action for later examination.
Tags:
Parameters
| string |
$table |
The name of the table that the action affects. |
| string |
$module |
The name of the module that performed the action, or alternativly a description of the action. |
| string |
$comment |
An optional comment to add additional information to the log message. |
logAdminActivity [line 63]
void logAdminActivity(
string $table, string $module, [mixed $sqlSelector = ''], string $sqlSelectThe)
|
|
This function is notified whenever a module performs a table altering action. Everything that should be notified of admin activity should hook in here.
Tags:
Parameters
| string |
$table |
The name of the table that the action affects. |
| string |
$module |
The name of the module class that performed the action, or alternativly a description of the action. |
| string |
$sqlSelectThe |
sql selector (if there is any) that specifies the row that was altered. |
|