Exemple #1
0
 static function getInstance($front_call = null)
 {
     if (!self::$instance) {
         self::$instance = new gallery_module_common($front_call);
     }
     return self::$instance;
 }
Exemple #2
0
 function gallery_module_front()
 {
     $this->_module_name = 'gallery';
     //true так как front_call
     $this->_common_obj =& gallery_module_common::getInstance(true);
     $this->_tree =& $this->_common_obj->obj_tree;
     $this->context = null;
     $this->_tree->enable_cache(true);
     parent::__construct();
 }
Exemple #3
0
 function common_call($front_call = null)
 {
     $this->_module_name = 'gallery';
     $this->_common_obj =& gallery_module_common::getInstance();
     $this->_tree =& $this->_common_obj->obj_tree;
 }
Exemple #4
0
 function load_xlist_gallery_albums($parameters)
 {
     Common::call_common_instance('gallery');
     $gallery =& gallery_module_common::getInstance(true);
     $TD = Common::inc_module_factory('TTreeSource');
     $options['startNode'] = $parameters['anc_id'];
     $options['shownodesWithObjType'] = array('_ROOT', '_GALLERY', '_ALBUM');
     $options['columnsAsParameters'] = array('LastModified' => 'LastModified', 'name' => 'Name');
     $options['columnsAsStructs'] = array('image' => 'obj_type');
     $options['transformResults']['image'] = array('_ROOT' => 'group', '_GALLERY' => 'group', '_ALBUM' => 'page');
     $options['selectable'] = array('image' => array('_ALBUM'));
     $this->result['data_set'] = null;
     $TD->init_from_source($gallery->obj_tree);
     $TD->setOptions($options);
     $TD->CreateView($parameters['anc_id']);
     $this->result = array_merge_recursive($TD->result, $this->result);
 }