KWeb  6.4
KWebStructure_Interface Interface Reference

Interface for KWebStructure. More...

Inheritance diagram for KWebStructure_Interface:
KWebStructure KWebStructure_Adapter KWebStructure_Foreign KWebStructure_Comment KWebStructure_Item

Public Member Functions

 getCollection (array $options=array())
 Returns the collection of objects/items/values this structure handles.
 getStructureUrl (array $params=array(), $lang=false, array $options=array())
 Returns standard url to this structure.
 buildStructureMenu (Menu_Item $menu, $which, array $options=array())
 Builds menus for this structure.
 handleStructureAction ($action, $data, $confirmed, array $options=array())
 Handles actions on this structure.
 handleObjectAction ($object, $action, $data, $confirmed, array $options=array())
 Handles actions on a single object.
 getStructureObject ()
 prepareDataFilters ($object, $navbar, array &$filters, $adapter)
 Prepares the navbar and a list of post-fetch filters for this structure.

Detailed Description

Interface for KWebStructure.


Member Function Documentation

KWebStructure_Interface::buildStructureMenu ( Menu_Item menu,
which,
array $  options = array() 
)

Builds menus for this structure.

Parameters:
$menuMenu_Item to add into.
$whichThere are several menus the structure can plug into, see KWebStructure::MENU_* For MENU_STRUCTURES it's this structure's own menu item, for the rest, they're global menus.
Returns:
Menu_Item Returns $menu that was passed, or entirely new object to replace it.

Implemented in KWebStructure_Comment, KWebStructure_Item, and KWebStructure_Foreign.

KWebStructure_Interface::getCollection ( array $  options = array())

Returns the collection of objects/items/values this structure handles.

Parameters:
$options- additional options for collection, usually same options as used with KWebAdapter
$cache- should results be cached?
Returns:
Collection

Implemented in KWebStructure_Adapter, and KWebStructure_Foreign.

KWebStructure_Interface::getStructureObject ( )
Returns:
KWebObject

Implemented in KWebStructure, and KWebStructure_Item.

KWebStructure_Interface::getStructureUrl ( array $  params = array(),
lang = false,
array $  options = array() 
)

Returns standard url to this structure.

Implemented in KWebStructure.

KWebStructure_Interface::handleObjectAction ( object,
action,
data,
confirmed,
array $  options = array() 
)

Handles actions on a single object.

Typically called during processing handleStructureAction, and not by itself

Parameters:
$action- action id
$data- array with action data. Action dependent. See KWebStructure::DATA_*
$confirmed- if FALSE, the action should return array(KWebStructure::RESULT_CONFIRM => Menu_Item()) with items to confirm. if TRUE, the actions should be handled.
$options- general options for action handling and/or specific action (see KWebStructure::OPT_*)

Implemented in KWebStructure_Item, KWebStructure, KWebStructure_Comment, and KWebStructure_Foreign.

KWebStructure_Interface::handleStructureAction ( action,
data,
confirmed,
array $  options = array() 
)

Handles actions on this structure.

Parameters:
$action- action id
$data- array with action data, like list of id's, etc. Action dependent. See KWebStructure::DATA_*
$confirmed- if false, the action should return array(KWebStructure::RESULT_CONFIRM => Menu_Item()) with items to confirm. if true, the actions should be handled.
$options- general options for action handling and/or specific action (see KWebStructure::OPT_*)

Implemented in KWebStructure_Item, KWebStructure, KWebStructure_Comment, and KWebStructure_Foreign.

KWebStructure_Interface::prepareDataFilters ( object,
navbar,
array &$  filters,
adapter 
)

Prepares the navbar and a list of post-fetch filters for this structure.

Parameters:
KWebObject$object
KWebNavbar$navbar
KWebAdapter$adapter

Implemented in KWebStructure, and KWebStructure_Adapter.


The documentation for this interface was generated from the following file: