Esempio n. 1
0
 function _init_class_displays()
 {
     $class = isset($this->_source_criteria['class']) && $this->_source_criteria['class'] ? $this->_source_criteria['class'] : false;
     if (!($class && is_array($class))) {
         return false;
     }
     $class_display_criteria = $this->_source_criteria;
     // class groups dont show content that also has a tag to be listed
     $tag = isset($this->_source_criteria['tag']) && $this->_source_criteria['tag'] ? $this->_source_criteria['tag'] : false;
     if ($tag && is_array($tag)) {
         unset($class_display_criteria['tag']);
         $class_display_criteria['not_tag'] = $tag;
     }
     require_once 'AMP/Content/Class.inc.php';
     foreach ($class as $class_group) {
         $source = new ContentClass(AMP_Registry::getDbcon(), $class_group);
         $class_display_criteria['class'] = $class_group;
         $class_display = new $this->_grouped_list_class($null = 0, $class_display_criteria, $source->getListItemLimit());
         $class_display->set_container($source);
         $class_display->_class_pager = 'AMP_Display_Pager_Morelinkplus';
         $class_display->_path_pager = 'AMP/Display/Pager/Morelinkplus.php';
         $class_display->set_pager_limit($this->_pager_limit, 'first');
         if (!empty($this->_source_criteria['section'])) {
             $class_display->set_pager_request(array('type' => $this->_source_criteria['section'], 'class' => $class_group, 'list' => 'class'));
         } else {
             $class_display->set_pager_request(array('class' => $class_group, 'list' => 'class'));
         }
         $this->_group_displays['classes'][$class_group] = $class_display;
     }
 }