Package DE_EPAGES::Presentation::API::Object::Tray
object interface to object tray of session.
The tray is used to select objects and transfer them between
different pages in the back-office.
Base |
DE_EPAGES::Core::API::Object::BaseObject |
Functions
- addObjectsToClassGroup
- addObjectsToGroup
- delete
- deleteGroup
- groups
- load
- objects
- objectsByClass
- objectsByGroup
- setGroup
addObjectsToClassGroup
Adds a list objects to the tray. The objects are automatically assigned to groups with the name of the object's classes, for example 'Tent', 'Jacket' etc..
Syntax |
$Tray->addObjectsToClassGroup( $aObjects ); |
Example |
$Tray->addObjectsToGroup( \@Products ); |
Input |
|
addObjectsToGroup
Adds objects to the tray.
Syntax |
$Tray->addObjectsToGroup( $TrayGroupID, $aObjects ); |
Example |
$Tray->addObjectsToGroup( $Tray->setGroup('Products'), [ $Product ] ); |
Input |
|
delete
Deletes this object
Syntax |
$Object->delete; |
deleteGroup
Deletes a group of objects from the tray.
Syntax |
$Tray->deleteGroup( $TrayGroupID ); |
Example |
$Tray->deleteGroup( $Tray->setGroup( 'Products') ); |
Input |
|
groups
Returns the groups of objects that are currenty in the tray.
Syntax |
$ahTrayGroups = $Tray->groups; |
Return |
|
load
Returns the tray object of the session.
Syntax |
$Tray = DE_EPAGES::Presentation::API::Object::Tray->load( $IntSessionID ); |
Input |
|
Return |
|
objects
Returns all objects that are currently in the tray.
Syntax |
$aObjects = $Tray->objects; |
Return |
|
objectsByClass
Returns all objects from the tray that are instances of a class.
Syntax |
$aObjects = $Tray->objectsByClass( $Class ); |
Example |
$aProducts = $Tray->objectsByClass( LoadClassByAlias('Product') ); |
Input |
|
Return |
|
objectsByGroup
Returns all objects of a tray group.
Syntax |
$aObjects = $Tray->objectsByGroup( $TrayGroupID ); |
Example |
$aProducts = $Tray->objectsByGroup( $Tray->setGroup( 'Products') ); |
Input |
|
Return |
|
setGroup
Returns the group id by group name. Creates a new group if the group name does not yet exist in the tray.
Syntax |
$TrayGroupID = $Tray->setGroup( $Name ); |
Example |
$TrayGroupID = $Tray->setGroup( 'Products' ); |
Input |
|
Return |
|