Bric::Biz::Element - Bricolage Document Element base class $LastChangedRevision$ $LastChangedDate: 2006-03-29 11:49:19 -0800 (Wed, 29 Mar 2006) $ my @elements = Bric::Biz::Element->list($params) $id = $element->get_id; $element = $element->activate; $element = $element->deactivate; my $active = $element->is_active; $element = $element->save; This class defins the common structure of elements, the building blocks of Bricolage story and media documents. There are two types of elements: container elements and data elements. Container elements can contain any number of container and data subelements. Data elements contain values, and corrspond to fields in the Bricolage UI. See Bric::Biz::Element::Container and Bric::Biz::Element::Field for details of their interfaces and how they vary from Bric::Biz::Element.

Constructors
Constructs a new element. Its attributes can be initialized via the $init hash reference. See the subclasses for a list of parameters. Cannot be called directly, but must be called from a subclass. Throws: NONE. Side Effects: NONE. Notes: NONE. Searches for and returns a list or anonymous array of element objects. Cannot be called directly, but must be called from a subclass. Throws: Side Effects: NONE. Notes: NONE.

Destructors
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

Public Class Methods
Returns an anonymous hash of introspection data for this object. If called with a true argument, it will return an ordered list or anonymous array of introspection data. If a second true argument is passed instead of a first, then a list or anonymous array of introspection data will be returned for properties that uniquely identify an object (excluding "id", which is assumed). Each hash key is the name of a property or attribute of the object. The value for a hash key is another anonymous hash containing the following keys: name - The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned. disp - The display name of the property or attribute. get_meth - A reference to the method that will retrieve the value of the property or attribute. get_args - An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute. set_meth - A reference to the method that will set the value of the property or attribute. set_args - An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute. type - The type of value the property or attribute contains. There are only three types: len - If the value is a 'short' value, this hash key contains the length of the field. search - The property is searchable via the list() and list_ids() methods. req - The property or attribute is required. props - An anonymous hash of properties used to display the property or attribute. Possible keys include: The display field type. Possible values are length - The Length, in letters, to display a text or password field. maxlength - The maximum length of the property or value - usually defined by the SQL DDL. rows - The number of rows to format in a textarea field. cols - The number of columns to format in a textarea field. vals - An anonymous hash of key/value pairs reprsenting the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: NONE. Searches for and returns a list or anonymous array of element object IDs. Cannot be called directly, but must be called from a subclass. Throws: Side Effects: NONE. Notes: NONE.

Public Instance Methods
Returns the element ID. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element name. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element key name. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element description. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the ID of the element's parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Sets the ID of the element's parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element place, that is, its place in the order of subelements of the parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Sets the element place, that is, its place in the order of subelements of the parent element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the element object type ("story" or "media"); Throws: NONE. Side Effects: NONE. Notes: NONE. Sets the element object type ("story" or "media"); Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the ID of the version of the document (story or media) that the element is associated with. Throws: NONE. Side Effects: NONE. Notes: NONE. Sets the ID of the version of the document (story or media) that the element is associated with. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if an element has a name matching the $name argument. Note that this is not a direct comparison to the "name" attribute of the element object. Rather, it converts $name so that it is all lowercase and its non-alphanumeric characters are changed to underscores. The resulting value is then compared to the element's "key_name" attribute. In general, it's a better idea to use "has_key_name()", or to do direct key name comparisons yourself. This method is provided for backwards compatability. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if an element has a key name matching the $key_name argument. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the parent element object. Throws: NONE. Side Effects: NONE. Notes: NONE. Activates the element. Throws: NONE. Side Effects: NONE. Notes: NONE. Deactivates the element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if the element is active, and false if it is not. Throws: NONE Side Effects: NONE Notes: NONE NONE

Private Class Methods
NONE

Private Instance Methods
NONE NONE michael soderstrom <miraso@pacbell.net> perl, Bric, Bric::Biz::Asset::Business::Story, Bric::Biz::Asset::Business::Media, Bric::Biz::ElementType, Bric::Biz::Element::Container, Bric::Biz::Element::Tile