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

Class: AdminPanel

Source Location: /_includes/lib_admin_panel.php

Class Overview

AdminModule
   |
   --AdminPanel

Describes a panel itself. The panel itself is an module that shows an overview of a table and the available modules.


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: AdminModule

AdminModule::__construct()
Constructor for AdminModule.
AdminModule::getAdminActions()
Gets all admin actions handled by the module.
AdminModule::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).
AdminModule::getGlobalLinkPattern()
Override this function if the module should be linked to once in the panel.
AdminModule::getOutput()
Gets the output that the module wants to diaply.
AdminModule::handlesAction()
Checks if an action can be handled by the module.
AdminModule::logActivity()
Notifies everything that should be notified of admin activity. This function should be called whenever a module alters a table.

Class Details

[line 1050]
Describes a panel itself. The panel itself is an module that shows an overview of a table and the available modules.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$defaultAction =

[line 1062]

The action that should be used if no other action is declared (in $_REQUEST).



Tags:

access:  private

Type:   string


[ Top ]

$displayer =

[line 1099]

The table displayer that should be used to view the the contents of the viewe database.



Tags:

access:  private



[ Top ]

$fields =

[line 1073]

Contains the fields (represented by TableField instances) that should be displayed.



Tags:

access:  private

Type:   array


[ Top ]

$formatCallbacks =

[line 1081]

Contains callbacks that should be used to properly format fields. Key is the tables fieldname, value is the callback. If no callback for a field is found then the field is directly outputted without any preprocessing.



Tags:

access:  private

Type:   array


[ Top ]

$itemsPerPage =

[line 1093]

The number of items that should be displayed in each page when viewing the table overview.



Tags:

access:  private

Type:   integer


[ Top ]

$modules =

[line 1056]

Contains all the modules (AdminModule instances) that belong to the panel.



Tags:

access:  private

Type:   array


[ Top ]

$queryAppendage =

[line 1087]

The appendage to the view query. This could for instance be a match statement or a order apppendage.



Tags:

access:  private

Type:   string


[ Top ]

$tabel =

[line 1067]

The name of the table that the panel should view.



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


constructor __construct [line 1115]

AdminPanel __construct( string $table, array $fieldsToView, [string $queryAppendage = ''], [string $defaultAction = ''], [array $formatCallbacks = array()])

Constructor for AdminPanel.



Tags:

access:  public


Overrides AdminModule::__construct() (Constructor for AdminModule.)

Parameters:

string   $table   The table that should be overviewed to.
array   $fieldsToView   An array of TableField with the fields that should be viewed.
string   $queryAppendage   An optional condition on what and how to show the sql result. The condition is appended to the end of the query.
string   $defaultAction   The action value that should be used if no other action is declared. If no value is specified then the first module added to the panel will be used.
array   $formatCallbacks   An array of Field (from lib_form_generator.php) with the connected table field as name.

[ Top ]

method addModule [line 1157]

void addModule( AdminModule $module)

Adds an additional module to the panel.



Tags:

access:  public


Parameters:

AdminModule   $module   The module that should be added.

[ Top ]

method getOutput [line 1210]

void getOutput( mixed $action)



Tags:

access:  public
see:  AdminModule.getOutput($action)


Overrides AdminModule::getOutput() (Gets the output that the module wants to diaply.)

[ Top ]

method getPanel [line 1173]

string getPanel( )

Gets the panel in its HTML form.



Tags:

return:  An admin panel.
access:  public


[ Top ]

method setItemsPerPage [line 1139]

void setItemsPerPage( integer $newValue)

Sets the number of items that should be displayed in each page when viewing the table overview.



Tags:

access:  public


Parameters:

integer   $newValue   The number of items that should be displayed per page.

[ Top ]

method setTableDisplayer [line 1149]

void setTableDisplayer( AbstractTableDisplayer $newTableDisplayerToUse)

Sets a new table displayer that should be used by the panel to view databses with.



Tags:

access:  public


Parameters:

AbstractTableDisplayer   $newTableDisplayerToUse   the new table displayer that should be used.

[ Top ]


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