Bric::Biz::Asset::Business::Parts::Tile::Container - The class that contains other tiles
$Revision: 1.16 $
$Date: 2002/08/30 18:06:55 $
# Creation of Objects
$tile = Bric::Biz::Asset::Business::Parts::Tile::Container->new
($initial_state)
$tile = Bric::Biz::Asset::Business::Parts::Tile::Container->lookup
( { id => $id })
($tile_list, @tiles) =
Bric::Biz::Asset::Business::Parts::Tile::Container->list( $criteria )
($id_list || @ids) =
Bric::Biz::Asset::Business::Parts::Tile::Container->list_ids($criteria)
$tile = $tile->add_contained( [ $tiles])
( $t_list || @tiles ) = $tile->get_contained()
$tile = $tile->delete_contained( [ $tiles])
$tile = $tile->is_container();
$tile = $tile->reorder->( @new_order )
This is the class for tiles that contain other tiles. These can be data tiles and or other container tiles.
This will create a new tile object with the given state defined by the optional initial state argument
Supported Keys:
obj_type
obj_id
element__id
active
parent_id
place
throws:
"Object of type $class not allowed"
side effects:
NONE
notes:
NONE
This will return an existing tile object that is defined by the given id
throws:
"Missing required Parameter 'id'"
"Missing required Parameter 'object_type' or 'object'"
'Improper type of object passed to lookup'
side effects:
NONE
notes:
NONE
This will return a list or list ref of tiles that match the given criteria
Supported Keys:
The object to search for containers - must be a Bric::Biz::Asset::Business subclass. You must specify this parameter or object_type.
The type of object to find containers for - 'story' or 'media'. You must specify this parameter or object.
Find inactive stuff by setting this to 0, active with 1.
Find containers of a particular AssetType.
The name of the AssetType for the container
Find containers with a given parent container.
throws: NONE
side effects: NONE
notes: NONE
This will return a list or list ref of tile ids that match the given criteria
Supported Keys:
The object to search for containers - must be a Bric::Biz::Asset::Business subclass. You must specify this parameter or object_type.
The type of object to find containers for - 'story' or 'media'. You must specify this parameter or object.
Find inactive stuff by setting this to 0, active with 1.
Find containers of a particular AssetType.
The name of the AssetType for the container
Find containers with a given parent container.
throws: NONE
side effects: NONE
notes: NONE
Returns the ID of the story instance related to this container tile
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Set the ID of the story instance related to this container tile
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Instantiate the related instance to this container tile based on the id. This named 'get_related_story' rather than 'get_related_instance' since that is how the template designer who will use this will probably expect it to work (ie, they probably won't think in terms of an instance'.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Sets the media object that is related to this container
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the media object that is related to this tile
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the element object
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the name of the element
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the data fields that are allowed to be added to the container at this moment. Takes into account the current set of data elements added.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns a list of the possible containers that can be added to this object. This is synonymous with AssetType->get_containers() since containers don't support occurence constraints.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Takes an asset type data object and the data and creates a tile and then adds the tile to its self. Optionally accepts an $place argument to set the place property. Now that's service.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Given an asset type and the business asset this will create a new container tile and return it after adding it to this list
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
This method will search the contained tiles for one with the coresponding name ane object order field. It will then return the data from that data tile. Pass in the optional $date_format argument if you expect the data returned from $name to be of the date type, and you'd like a format other than that set in the "Date Format" preference.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Similar to get data this will return a container object that matches the given name field and object order description.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
returns a list of the sub contained tiles
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns a list of the tiles that are contained with in the container tile
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Adds the given tile to this container. The tile will become a child of this container and will be given an order with respect to the other child tiles already in this container.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Removes the tiles listed from the container
Throws:
NONE
Side Effects:
Will shift the remaining tiles to fit. So if tiles with ids of 2, 4, 7, 8, and 10 are contained and 4 and 8 are removed the new list of tiles will be 2,7, and 10
Notes:
Doesn't actually do any deletions, just schedules them. Call save() to complete the deletion.
When a business asset needs to clone its self. It can call this here method that will set the id to undef so that this here tile will clone its self.
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Takes a new order of tile ids as its argument and replaces the old order
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
will return true since this is a container. You did look at the package name, no? This is helpfuld for people cycling through contained tiles so they can decide to call get_contained or get data
throws:
NONE
Side Effects:
NONE
Notes:
NONE
Prepares this tile and its children to be removed
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
This will insert or update the records as is needed
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Called by list and list_ids, this does their dirty work
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Removes this record from the database
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
This will do a select and populate the object with the row
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Returns the asset type object that maps to this container tile
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Inserts a row relating to this object into the data base
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
This will preform an update on the database. That is why I called it do update
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
does a list for all the active contained tiles
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
Called by save this will preform all the operations on the contained tiles
Throws:
NONE
Side Effects:
NONE
Notes:
NONE
NONE
"Michael Soderstrom" <miraso@pacbell.net> Bricolage Engineering
perl, Bric, Bric::Biz::Asset, Bric::Biz::Asset::Business, Bric::Biz::Asset::Business::Parts::Tile
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
'=item' outside of any '=over'