Ejemplo n.º 1
0
 function add_allowed_criteria()
 {
     require_once 'AMP/Content/Nav/Layout/Layout.php';
     $this->criteria = $this->_base_criteria . ' AND ' . AMP_Content_Nav_Layout::makeCriteriaAllowed();
 }
Ejemplo n.º 2
0
 /**
  * create 
  * 
  * @param array $anchor = array containing one element of section_id/section_id_list/class_id/introtext_id 
  * @param array $positions 
  * @access public
  * @return AMP_Content_Nav_Layout 
  */
 function &create($anchor, $locations = array())
 {
     $new_layout = new AMP_Content_Nav_Layout(AMP_Registry::getDbcon());
     $new_layout->setDefaults();
     $new_layout->mergeData($anchor);
     $new_layout_desc = $new_layout->getLayoutAnchor();
     $target_name = $new_layout_desc['name'];
     if ($new_layout_desc['description'] == AMP_TEXT_SECTION_LIST) {
         $target_name .= ' ' . ucfirst(AMP_TEXT_LIST);
     }
     $new_layout->mergeData(array('name' => $target_name));
     if (!empty($locations)) {
         $new_layout->mergeData(array('locations' => $locations));
     }
     return $new_layout;
 }