Exemplo n.º 1
0
 public function post_menu()
 {
     $folder_id = (int) $this->param('folder_id', 0);
     $ds_id = (int) $this->param('ds_id', NULL, TRUE);
     $ds = DataSource_Section::load($ds_id);
     if ($ds->loaded()) {
         $ds->move_to_folder($folder_id);
         $this->status = TRUE;
     }
 }
Exemplo n.º 2
0
 /**
  * 
  * @param integer $id
  * @return DataSource_Section
  * @throws HTTP_Exception_404
  */
 public function section($id = NULL)
 {
     if ($this->_section instanceof DataSource_Section) {
         return $this->_section;
     }
     if ($id === NULL) {
         Messages::errors(__('Datasource section not loaded'));
         $this->go_home();
     }
     $this->_section = Datasource_Data_Manager::load((int) $id);
     if ($this->request->action() == 'index' and !$this->_section->has_access_view()) {
         $this->_deny_access();
     }
     if (empty($this->_section)) {
         Messages::errors(__('Datasource section :id not found', array(':id' => $id)));
         $this->go_home();
     }
     return $this->_section;
 }
Exemplo n.º 3
0
 /**
  * 
  * @param DataSource_Hybrid_Section $section
  */
 public function __construct(DataSource_Section $section)
 {
     $this->_section = $section;
     $this->ds_id = $section->id();
     $this->reset();
 }