/** * Hook for children views to allow them set the menu for the list requests. * Children views usually will not need to override this method. * * @return void */ protected function setListActions() { $user = JFactory::getUser(); if ($user->authorise('k2.extrafields.manage', 'com_k2')) { K2Response::addAction('add', 'K2_ADD', array('data-action' => 'add')); } }
/** * Hook for children views to allow them set the menu for the edit requests. * Children views usually will not need to override this method. * * @return void */ protected function setFormActions() { K2Response::addAction('save', 'K2_SAVE', array('data-action' => 'save', 'data-resource' => $this->getName())); K2Response::addAction('saveAndNew', 'K2_SAVE_AND_NEW', array('data-action' => 'save-and-new')); K2Response::addAction('saveAndClose', 'K2_SAVE_AND_CLOSE', array('data-action' => 'save-and-close')); K2Response::addAction('close', 'K2_CLOSE', array('data-action' => 'close')); }
/** * Hook for children views to allow them set the menu for the list requests. * Children views usually will not need to override this method. * * @return void */ protected function setListActions() { $user = JFactory::getUser(); if ($user->authorise('core.create', 'com_users')) { K2Response::addAction('add', 'K2_ADD', array('data-action' => 'add')); } }
/** * Hook for children views to allow them set the menu for the list requests. * Children views usually will not need to override this method. * * @return void */ protected function setListActions() { $user = JFactory::getUser(); $params = JComponentHelper::getParams('com_k2'); if ($user->authorise('k2.item.create', 'com_k2')) { K2Response::addAction('add', 'K2_ADD', array('data-action' => 'add')); } }