SourceForge.net LogoPHPGallue
[ class tree: gallue ] [ index: gallue ] [ all elements ]

Class: GALItem_frontend

Source Location: /gallue/GALItem_frontend.inc.php

Class Overview


Abstract class to display items in gallue.


Author(s):

Variables

Methods


Child classes:

GALUser_frontend
Generates XHTML markup to display/create/edit instances of GALUser.
GALContainer_frontend
Abstract base class to handle container-like items in gallue.
GALImage_frontend
Generates XHTML markup to display/create/edit instances of GALImage.
GALHelp_frontend
Generates XHTML markup to display/create/edit instances of GALHelp.

Class Details

[line 37]
Abstract class to display items in gallue.

This class defines some generic methods to display items of libgallue, e.g. display a list of images in table layout. Most methods accept a GALResultIterator, but the subclasses silently expect that the iterator contains compatible items - for GALImage_frontend the iterator should contain instances of GALImage. A design using templates would provide a clean and type-safe solution, but type safety doesn't seem to be the design goal of PHP ;). Do whatever you want - you will get exceptions if the types don't match and the display methods try to access unknown fields.




Tags:

abstract:  


[ Top ]


Class Variables

$container =

[line 57]



Tags:

access:  protected

Type:   GALTableRow


[ Top ]

$containerFrontend =

[line 53]

null if top-level



Tags:

access:  protected

Type:   GALItem_frontend


[ Top ]

$glb =

[line 41]



Tags:

access:  protected

Type:   GALGlobals


[ Top ]

$langs = array()

[line 47]

Array with all laguages in the config file.

This property contains the two-letter shortcuts of all configured languages.




Tags:

var:  Array of strings like de, en, ...
access:  protected

Type:   array


[ Top ]



Class Methods


static method registerVars [line 385]

static void registerVars( $globalvars)

Registers the necessary GET parameters.

This method registers all necessary GET parameters at the global GALGlobalvars object.




Overridden in child classes as:

GALContainer_frontend::registerVars()

Parameters:

   $globalvars  

[ Top ]

constructor __construct [line 61]

GALItem_frontend __construct( GALGlobals $glb, [ $containerFrontend = null], [ $container = null])



Parameters:

GALGlobals   $glb   Link to the global information of the gallery.
   $containerFrontend  
   $container  

[ Top ]

method action [line 344]

void action( string $action, int $id, $param1, $param2)

Executes an one-click action.

This method performes an action whose parameters are transmitted through the GET parameters 'target', 'action' and 'id'. The 'target' parameter is used to determine the class that executes the action. target=help&action=delete&id=1 would delete the help entry 1.




Overridden in child classes as:

GALContainer_frontend::action()
This method executes one click actions.
GALImage_frontend::action()
This method executes one click actions.
GALHelp_frontend::action()
This method executes one click actions.

Parameters:

string   $action   The action to perform.
int   $id   Indicates the item the action shall be performed on.
   $param1  
   $param2  

[ Top ]

method appendEdit [line 101]

void appendEdit( $field, $checkboxNode, $titleNode, $inputNode, $showCheckbox, $width, $height, [ $presetItem = false], [ $preset = array()])



Overridden in child classes as:

GALUser_frontend::appendEdit()

Parameters:

   $field  
DOMNode   $checkboxNode  
DOMNode   $titleNode  
DOMNode   $inputNode  
   $showCheckbox  
   $width  
   $height  
   $presetItem  
   $preset  

[ Top ]

method appendInput_comment [line 177]

void appendInput_comment( $inputNode, $id, $width, $height, $presetItem)



Parameters:

DOMNode   $inputNode  
   $id  
   $width  
   $height  
   $presetItem  

[ Top ]

method appendInput_permission [line 201]

void appendInput_permission( $inputNode, $id, $width, $height, $presetItem)



Parameters:

DOMNode   $inputNode  
   $id  
   $width  
   $height  
   $presetItem  

[ Top ]

method appendInput_sortHint [line 239]

void appendInput_sortHint( $inputNode, $id, $width, $height, $presetItem)



Parameters:

DOMNode   $inputNode  
   $id  
   $width  
   $height  
   $presetItem  

[ Top ]

method appendInput_tag [line 257]

void appendInput_tag( $inputNode, $id, $width, $height, $presetItem)



Parameters:

DOMNode   $inputNode  
   $id  
   $width  
   $height  
   $presetItem  

[ Top ]

method appendInput_title [line 190]

void appendInput_title( $inputNode, $id, $width, $height, $presetItem)



Parameters:

DOMNode   $inputNode  
   $id  
   $width  
   $height  
   $presetItem  

[ Top ]

method button [line 563]

void button( $type, $node, [ $setCurrent = true])



Parameters:

   $type  
DOMNode   $node  
   $setCurrent  

[ Top ]

method calculateNavbar [line 402]

array calculateNavbar( int $count, int $offset, $step)

Calculates offsets for a logarithmic navigation bar.

This method reads the navlogbase value from configuration and calculates the offsets.




Tags:

return:  Array of integers; 0 <= n <= $count.


Parameters:

int   $count   The number of elements.
int   $offset   The current offset.
   $step  

[ Top ]

method countSelection [line 556]

void countSelection( )



[ Top ]

method create [line 327]

DOMNode create( $node)

Displays a form for creating a new item.



Tags:

return:  The node of the <form> tag.
abstract:  


Overridden in child classes as:

GALUser_frontend::create()
Appends a form to create users to the given DOMNode.
GALCategory_frontend::create()
Appends a form to create categories to the given DOMNode.
GALFilm_frontend::create()
Appends a form to create films to the given DOMNode.
GALSeries_frontend::create()
Appends a form to create series to the given DOMNode.
GALGroup_frontend::create()
Appends a form to create groups to the given DOMNode.
GALImage_frontend::create()
Appends a form to create images to the given DOMNode.
GALHelp_frontend::create()
Appends a form to create help items to the given DOMNode.

Parameters:

DOMNode   $node   The parent node to which the form is appended.

[ Top ]

method defaultEditFields [line 614]

void defaultEditFields( )



Overridden in child classes as:

GALUser_frontend::defaultEditFields()
GALImage_frontend::defaultEditFields()

[ Top ]

method edit [line 289]

void edit( $node)

Evaluates the settings in the global GALGlobalvars object and determines which method to call with wich parameters.



Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::edit()
Generates the XHTML markup for the textfield.
GALCategory_frontend::edit()
Generates the XHTML markup for the textfield.
GALFilm_frontend::edit()
Generates the XHTML markup for the textfield.
GALSeries_frontend::edit()
Generates the XHTML markup for the textfield.
GALGroup_frontend::edit()
Generates the XHTML markup for the textfield.
GALImage_frontend::edit()
Generates the XHTML markup for the textfield.
GALHelp_frontend::edit()
Generates the XHTML markup for the textfield.

Parameters:

DOMNode   $node   the DOMNode the output is appended to.

[ Top ]

method editFields [line 77]

void editFields( $node, [ $item = false], [ $withCheckbox = false], [ $fields = array()], [ $preset = array()])



Parameters:

DOMNode   $node  
   $item  
   $withCheckbox  
   $fields  
   $preset  

[ Top ]

method editSingle [line 283]

DOMNode editSingle( $item, $node)

Displays a form to edit a single item.

This method appends a form to the given DOMNode that allows detailed editing of the given item.




Tags:

return:  The <form> tag.
abstract:  


Overridden in child classes as:

GALUser_frontend::editSingle()
Display a form to edit an user.
GALCategory_frontend::editSingle()
Display a form to edit a category item.
GALFilm_frontend::editSingle()
Display a form to edit a film item.
GALSeries_frontend::editSingle()
Display a form to edit a series item.
GALGroup_frontend::editSingle()
Display a form to edit a group item.
GALImage_frontend::editSingle()
Display a form to edit an image.
GALHelp_frontend::editSingle()
Display a form to edit a help item.

Parameters:

GALTableRow   $item   The item to edit.
DOMNode   $node   The parent node which the output is appended to.

[ Top ]

method evalEdit [line 160]

void evalEdit( $field)



Parameters:

   $field  

[ Top ]

method evalEdit_permission [line 227]

void evalEdit_permission( )



[ Top ]

method execute [line 334]

void execute( array &$postvars)

Evaluates the transmitted POST data.

This method evaluates the POST data which are sent after submitting a form which was generated by this class.




Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::execute()
Evaluates POST parameters.
GALCategory_frontend::execute()
Evaluates POST parameters.
GALFilm_frontend::execute()
Evaluates POST parameters.
GALSeries_frontend::execute()
Evaluates POST parameters.
GALGroup_frontend::execute()
Evaluates POST parameters.
GALImage_frontend::execute()
Evaluates POST parameters.
GALHelp_frontend::execute()
Evaluates POST parameters.

Parameters:

array   &$postvars   The POST data, usually $_POST.

[ Top ]

method fastMenu [line 307]

void fastMenu( $node)

Evaluates the settings in the global GALGlobalvars object and displays a list of links for fast switching of the current item, e.g. for editing.



Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::fastMenu()
Displays a menu with elements of the current selection.
GALContainer_frontend::fastMenu()
Displays a menu with elements of the current selection.
GALImage_frontend::fastMenu()
Displays a menu with elements of the current selection.
GALHelp_frontend::fastMenu()
Displays a menu with elements of the current selection.

Parameters:

DOMNode   $node   the DOMNode the output is appended to.

[ Top ]

method getContainer [line 74]

void getContainer( )



[ Top ]

method getContainerFrontend [line 71]

void getContainerFrontend( )



[ Top ]

method getMultiFrontend [line 553]


method getPlural [line 551]


method getSingular [line 552]


method getTable [line 550]


method getTarget [line 549]

string getTarget( )

Returns the string that is used to identify the target class.




Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::getTarget()
The target, i.e. 'user'.
GALCategory_frontend::getTarget()
GALFilm_frontend::getTarget()
GALSeries_frontend::getTarget()
GALGroup_frontend::getTarget()
GALImage_frontend::getTarget()
The target, i.e. 'image'.
GALHelp_frontend::getTarget()

[ Top ]

method layoutMenu [line 301]

void layoutMenu( $node)

Evaluates the settings in the global GALGlobalvars object and displays a list of links with available layout variants.



Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::layoutMenu()
Displays a menu with all layouts suitable for this class.
GALContainer_frontend::layoutMenu()
Displays a menu with all layouts suitable for this class.
GALImage_frontend::layoutMenu()
Displays a menu with all layouts suitable for this class.
GALHelp_frontend::layoutMenu()
Displays a menu with all layouts suitable for this class.

Parameters:

DOMNode   $node   the DOMNode the output is appended to.

[ Top ]

method navbar [line 460]

void navbar( int $count, int $step, $node)

Displays a navigation bar.

This method builds a navigation bar that is suitable for navigating up to 100,000 or more items in a limited space by exponentially increasing the offset the farther a link is from the current offset.




Overridden in child classes as:

GALContainer_frontend::navbar()
GALImage_frontend::navbar()

Parameters:

int   $count   The total number of elements.
int   $step   The steps to use for the "page forward/page backward" links
DOMNode   $node   The node the navbar is appended to.

[ Top ]

method navdiv [line 530]

void navdiv( $count, $step, $node)



Parameters:

   $count  
   $step  
DOMNode   $node  

[ Top ]

method order [line 314]

GALOrder order( )

Builds a GALOrder object.

This method builds a GALOrder object that represents the ordering that is used when multiple items are fetched.




Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::order()
Builds an instance of GALOrder.
GALCategory_frontend::order()
Builds an instance of GALOrder.
GALFilm_frontend::order()
Builds an instance of GALOrder.
GALSeries_frontend::order()
Builds an instance of GALOrder.
GALGroup_frontend::order()
Builds an instance of GALOrder.
GALImage_frontend::order()
Builds an instance of GALOrder.
GALHelp_frontend::order()
Builds an instance of GALOrder.

[ Top ]

method permission2str [line 604]

void permission2str( $perm)



Tags:

access:  protected


Parameters:

   $perm  

[ Top ]

method selection [line 321]

GALExpression selection( )

Builds a GALExpression.

This method builds a GALExpression object that is used to select what items are displayed.




Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::selection()
Builds an instance of GALExpression.
GALCategory_frontend::selection()
Builds an instance of GALExpression.
GALFilm_frontend::selection()
Builds an instance of GALExpression.
GALSeries_frontend::selection()
Builds an instance of GALExpression.
GALGroup_frontend::selection()
Builds an instance of GALExpression.
GALImage_frontend::selection()
Builds an instance of GALExpression.
GALHelp_frontend::selection()
Builds an instance of GALExpression.

[ Top ]

method show [line 295]

void show( $node)

Evaluates the settings in the global GALGlobalvars object and determines which method to call with wich parameters.



Tags:

abstract:  


Overridden in child classes as:

GALUser_frontend::show()
Evaluates the settings in the global GALGlobalvars object and determines which method to call with wich parameters.
GALContainer_frontend::show()
Generates the XHTML markup for the textfield.
GALImage_frontend::show()
Evaluates the settings in the global GALGlobalvars object and determines which method to call with wich parameters.
GALHelp_frontend::show()
Generates the XHTML markup for the textfield.

Parameters:

DOMNode   $node   the DOMNode the output is appended to.

[ Top ]

method str2permission [line 595]

void str2permission( $str)



Tags:

access:  protected


Parameters:

   $str  

[ Top ]


Documentation generated on Wed, 16 Aug 2006 15:35:57 +0200 by phpDocumentor 1.3.0RC6