com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Class: AdminModule

Source Location: /_includes/lib_admin_panel.php

Class Overview


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.


Author(s):

  • Andreas Launila

Variables

Methods


Child classes:

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.

Class Details

[line 163]
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.



Tags:

abstract:  
author:  Andreas Launila


[ Top ]


Class Variables

$actions =

[line 170]

Contains all actions that the module handles. The key is the action identifier and the value is the corresponding AdminAction instance.



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


constructor __construct [line 177]

AdminModule __construct( array $definedActions)

Constructor for AdminModule.



Tags:

access:  public


Overridden in child classes as:

DeleteModule::__construct()
Constructor for DeleteModule.
EditModule::__construct()
Constructor for EditModule.
AddModule::__construct()
Constructor for AddModule.
CallbackModule::__construct()
Constructor for CallbackModule.
DetailsModule::__construct()
Constructor for DetailsModule.
UpdateModule::__construct()
Constructor for UpdateModule.
AdminPanel::__construct()
Constructor for AdminPanel.

Parameters:

array   $definedActions   An array containing AdminAction describing all actions handled by the module.

[ Top ]

method getAdminActions [line 212]

array getAdminActions( )

Gets all admin actions handled by the module.



Tags:

return:  An array containing all admin actions that the module handles.
access:  public


[ Top ]

method getEntryLinkPattern [line 233]

string getEntryLinkPattern( )

Override this function if the module should be linked to once for every entry displayed in the panel's overview. The pattern can use fieldnames as $row['foo'] (where foo is the fieldname).



Tags:

return:  An expression that should be used with eval() or an empty string if none is defined.
access:  public


Overridden in child classes as:

DeleteModule::getEntryLinkPattern()
EditModule::getEntryLinkPattern()
CallbackModule::getEntryLinkPattern()
DetailsModule::getEntryLinkPattern()
UpdateModule::getEntryLinkPattern()

[ Top ]

method getGlobalLinkPattern [line 222]

string getGlobalLinkPattern( )

Override this function if the module should be linked to once in the panel.



Tags:

return:  An expression that should be used with eval() or an empty string if none is defined.
access:  public


Overridden in child classes as:

AddModule::getGlobalLinkPattern()
CallbackModule::getGlobalLinkPattern()

[ Top ]

method getOutput [line 195]

string getOutput( string $action)

Gets the output that the module wants to diaply.



Tags:

return:  Output defined by the module.
access:  public
abstract:  


Overridden in child classes as:

DeleteModule::getOutput()
EditModule::getOutput()
AddModule::getOutput()
CallbackModule::getOutput()
DetailsModule::getOutput()
UpdateModule::getOutput()
AdminPanel::getOutput()

Parameters:

string   $action   The action that triggered the output.

[ Top ]

method handlesAction [line 203]

boolean handlesAction( string $action)

Checks if an action can be handled by the module.



Tags:

return:  True if the action can be handled by the module, false otherwise.
access:  public


Parameters:

string   $action   The action to be checked.

[ Top ]

method logActivity [line 244]

void logActivity( string $table, [string $sqlSelector = ''])

Notifies everything that should be notified of admin activity. This function should be called whenever a module alters a table.



Tags:

access:  protected


Parameters:

string   $table   The name of the table that the action affects.
string   $sqlSelector   The sql selector (if there is any) that specifies the row that was altered.

[ Top ]


Documentation generated on Sun, 16 Apr 2006 21:03:07 +0200 by phpDocumentor 1.3.0RC4