public function admin_edit($id = null, $query = array())
 {
     $this->GlobalLayout->GlobalContent->hasField('id');
     parent::admin_edit($id, $query);
     $plugins = $this->GlobalLayout->getPlugins();
     $models = $this->GlobalLayout->getModels($this->request->data['GlobalLayout']['plugin']);
     $this->set(compact('plugins', 'models'));
 }
 public function admin_edit($id = null, $query = null)
 {
     parent::admin_edit($id, $query);
     $groups = array(0 => __('Public')) + $this->GlobalContent->Group->find('list');
     $layouts = $this->GlobalContent->GlobalLayout->find('list', array('conditions' => array('GlobalLayout.model' => $this->request->data['GlobalContent']['model'])));
     if (empty($layouts)) {
         $this->notice(__('Please create a layout for this content type'), array('level' => 'warning', 'redirect' => array('controller' => 'global_layouts', 'action' => 'add')));
     }
     $this->set(compact('groups', 'layouts'));
 }
 public function admin_edit($id = null)
 {
     unset($this->request->data['GlobalContent']['global_category_id']);
     parent::admin_edit($id);
 }