Class layout_metadata_elements

Description

A class which holds multiple metadata elements, for a given layout.

Acquires all the metadata elements for a given layout. Provides the means to render these.

Located in /metadata-defs.php (line 1034)


	
			
Variable Summary
Method Summary
 layout_metadata_elements layout_metadata_elements ([integer $layout_id = ""], [string $formname = ""], [boolean $instantiated_only = false])
 void add_metadata_element (object $meta)
 boolean get ([integer $layout_id = ""], [mixed $instantiated_only = false])
 void get_metadata_element (integer $element_id)
 string html ()
 void insert_metatags (reference &$webpage)
 string metadata_tree ()
 integer meta_element_count ()
 void remove_metadata_element (integer $element_id)
 void save_metadata_element (integer $element_id)
Variables
mixed $formname = "" (line 1044)

Standard form name to use

mixed $layout_id = "" (line 1037)

The layout these elements are for

mixed $metadata_elements = array() (line 1039)

The metadata elements themselves

Methods
Constructor layout_metadata_elements (line 1051)

Constructor

layout_metadata_elements layout_metadata_elements ([integer $layout_id = ""], [string $formname = ""], [boolean $instantiated_only = false])
  • integer $layout_id: The unique ID of the layout
  • string $formname: The form name to use for form rendering
  • boolean $instantiated_only: True means get only existing meta data
add_metadata_element (line 1252)

Add a metadata element to our array of elements. We add it to an associative array keyed on the element_id, ensuring no duplicates.

void add_metadata_element (object $meta)
  • object $meta: The metadata element object to add
get (line 1069)

Get all of the metadata elements associated with this layout. We can

do this in two modes, determined by the $instantiated_only flag. If this is true then we only grab the data for the metadata elements which exist for the layout. Otherwise we grab ALL of them. The latter is for editing, and the former is for page rendering where we want minimal Db traffic.

  • return: Whether the get succeeded and object is valid
boolean get ([integer $layout_id = ""], [mixed $instantiated_only = false])
  • integer $layout_id: The ID of the layout to get elements for
get_metadata_element (line 1261)

Return a metadata element, given its element_id.

void get_metadata_element (integer $element_id)
  • integer $element_id: The element ID of the element to return
html (line 1345)

Render all of the elements as HTML

  • return: HTML rendering of all contained metadata elements
string html ()
insert_metatags (line 1331)

Insert the instantiated metatags into the given webpage. This is intended to be used on the $RESPONSE object to actually jam the tags for this layout into the webapage.

void insert_metatags (reference &$webpage)
  • reference &$webpage: Reference to Webpage object to insert metatags into
metadata_tree (line 1223)

Returns a string containing a table which contains all of the meta data in a nice tree view.

  • return: A table containing all metadata elements for viewing
string metadata_tree ()
meta_element_count (line 1154)

Returns the number of meta elements in this layout.

  • return: Number of metadata elements currently in this layout
integer meta_element_count ()
perform_hierarchy_scan (line 1136)

Assembles all metadata elements for this layout.

void perform_hierarchy_scan ()
remove_metadata_element (line 1314)

Removes the layout metadata for a given element. This deletes the relevant record from the ax_layout_metadata table.

void remove_metadata_element (integer $element_id)
  • integer $element_id: The element ID of the element to remove
save_metadata_element (line 1275)

Saves the layout metadata for a given element. This saves data to the ax_layout_metadata table.

void save_metadata_element (integer $element_id)
  • integer $element_id: The element ID of the element to return

Documentation generated by phpDocumentor 1.3.0RC3