當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JControllerAdmin::delete方法代碼示例

本文整理匯總了PHP中JControllerAdmin::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP JControllerAdmin::delete方法的具體用法?PHP JControllerAdmin::delete怎麽用?PHP JControllerAdmin::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JControllerAdmin的用法示例。


在下文中一共展示了JControllerAdmin::delete方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 public function delete()
 {
     parent::delete();
     $this->input = $this->input->post->get('trieda_id', 0, 'int');
     $this->setRedirect(JRoute::_('index.php?option=com_absolventi&view=ziacilist&trieda_id=' . $this->input, false));
     $this->redirect;
 }
開發者ID:vladorf,項目名稱:absolventi,代碼行數:7,代碼來源:ziaciadmin.php

示例2: delete

 public function delete()
 {
     // Get items to remove from the request and reverse the order to delete child albums first
     $cid = JFactory::getApplication()->input->get('cid', array(), 'array');
     JFactory::getApplication()->input->set('cid', array_reverse($cid));
     parent::delete();
 }
開發者ID:chaudhary4k4,項目名稱:modernstore,代碼行數:7,代碼來源:categories.php

示例3: delete

 public function delete()
 {
     /*
      * получаем имя файла из записи по ID
      * удаляем файл
      * выполняем родительский метод
      */
     $cid = JFactory::getApplication()->input->get('cid', array(), 'array');
     if (is_array($cid) && count($cid) > 0) {
         $arFilesToDelete = array();
         foreach ($cid as $id) {
             $db = JFactory::getDBO();
             $q = "SELECT `id`, `filename` FROM #__downfiles WHERE id = {$id}";
             $res = $db->setQuery($q);
             $data_row = $res->loadAssoc();
             $arFilesToDelete[] = $data_row["filename"];
         }
         jimport('joomla.filesystem.file');
         foreach ($arFilesToDelete as $fname) {
             JFile::delete(JPATH_ROOT . '/' . $fname);
         }
     } else {
         JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror');
     }
     parent::delete();
 }
開發者ID:matth-oz,項目名稱:com_downfiles,代碼行數:26,代碼來源:downfiles.php

示例4: delete

 function delete()
 {
     $cid = JRequest::getVar('cid', array(), '', 'array');
     if (!igGeneralHelper::authorise('core.delete', (int) $cid[0])) {
         return JError::raiseWarning(404, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
     }
     parent::delete();
 }
開發者ID:iFactoryDigital,項目名稱:gympieradiology,代碼行數:8,代碼來源:categories.php

示例5: delete

 /**
  * Removes an item.
  *
  * Overrides JControllerAdmin::delete to check the core.admin permission.
  *
  * @since	1.6
  */
 function delete()
 {
     if (!User::authorise('core.admin', $this->option)) {
         App::abort(500, Lang::txt('JERROR_ALERTNOAUTHOR'));
         exit;
     }
     return parent::delete();
 }
開發者ID:mined-gatech,項目名稱:hubzero-cms,代碼行數:15,代碼來源:groups.php

示例6: delete

 /**
  * Removes an item.
  *
  * Overrides JControllerAdmin::delete to check the core.admin permission.
  *
  * @since   1.6
  */
 public function delete()
 {
     if (!JFactory::getUser()->authorise('core.admin', $this->option)) {
         JError::raiseError(500, JText::_('JERROR_ALERTNOAUTHOR'));
         jexit();
     }
     return parent::delete();
 }
開發者ID:01J,項目名稱:topm,代碼行數:15,代碼來源:groups.php

示例7: delete

 /**
  * Removes an item.
  *
  * Overrides JControllerAdmin::delete to check the core.admin permission.
  *
  * @since   1.6
  */
 public function delete()
 {
     if (!JFactory::getUser()->authorise('core.admin', $this->option)) {
         throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'));
         jexit();
     }
     return parent::delete();
 }
開發者ID:joomlatools,項目名稱:joomla-platform,代碼行數:15,代碼來源:groups.php

示例8: delete

 /**
  * Removes an item.
  *
  * @return  void
  */
 public function delete()
 {
     parent::delete();
     $project = JRequest::getUInt('filter_project');
     $topic = JRequest::getUInt('filter_topic');
     $link = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&filter_project=' . $project . '&filter_topic=' . $topic;
     $this->setRedirect(JRoute::_($link, false));
 }
開發者ID:gagnonjeanfrancois,項目名稱:Projectfork,代碼行數:13,代碼來源:replies.php

示例9: delete

 public function delete()
 {
     parent::delete();
     if (!$this->getError()) {
         $app = JFactory::getApplication();
         $link = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&filter_project=' . (int) $app->input->get('filter_project') . '&filter_album=' . (int) $app->input->get('filter_album') . '&id=' . (int) $app->input->get('id') . '&revision=' . (int) $app->input->get('revision');
         $this->setRedirect(JRoute::_($link, false));
         return true;
     }
     return false;
 }
開發者ID:MrJookie,項目名稱:pm,代碼行數:11,代碼來源:revisions.php

示例10: deletehard

 public function deletehard()
 {
     $cid = JRequest::getString('cid', '');
     $cid = explode(',', $cid);
     if (count($cid)) {
         JRequest::setVar('cid', $cid, 'post');
         $token = JRequest::getVar(JSession::getFormToken());
         JRequest::setVar(JSession::getFormToken(), $token, 'post');
         parent::delete();
     }
     $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
 }
開發者ID:Rikisha,項目名稱:proj,代碼行數:12,代碼來源:newsletters.php

示例11: delete

 /**
  * Change the standard behavior after deleting
  *
  * @since	1.0
  */
 public function delete()
 {
     // Workaround for wrong foreign key. Removing all of entries from sub_list before removing list itself
     $cids = (array) JRequest::getVar('cid', array());
     if (!empty($cids)) {
         $dbo = JFactory::getDbo();
         $dbo->setQuery("DELETE FROM #__newsletter_sub_list WHERE list_id in ('" . implode("','", $cids) . "')");
         $dbo->query();
     }
     parent::delete();
     $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=subscribers', false));
 }
開發者ID:Rikisha,項目名稱:proj,代碼行數:17,代碼來源:lists.php

示例12: delete

 function delete()
 {
     $cid = JRequest::getVar('cid', array(), '', 'array');
     JArrayHelper::toInteger($cid);
     JRequest::setVar('cid', $cid, 'post');
     JFactory::getApplication()->input->post->set('cid', $cid);
     JRequest::setVar(JRequest::getCmd('formtoken'), 1, 'post');
     JFactory::getApplication()->input->post->set(JRequest::getCmd('formtoken'), 1);
     if (!igGeneralHelper::authorise('core.igalleryfront.delete', (int) $cid[0])) {
         return JError::raiseWarning(404, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
     }
     parent::delete();
 }
開發者ID:iFactoryDigital,項目名稱:gympieradiology,代碼行數:13,代碼來源:categories.php

示例13: delete

 /**
  * Redirection after standard saving
  *
  * @return void
  * @since 1.0
  */
 public function delete()
 {
     $jform = JRequest::getVar('jform');
     if ($jform['general_mailbox_default'] > 0) {
         JRequest::setVar('cid', $jform['general_mailbox_default']);
         parent::delete();
     } else {
         JFactory::getApplication()->enqueueMessage(JText::_('COM_NEWSLETTER_CANNOT_DELETE_JPROFILE'), 'error');
     }
     $rurl = JRequest::getString('returnurl');
     if (!empty($rurl)) {
         $this->setRedirect(base64_decode($rurl));
     }
 }
開發者ID:Rikisha,項目名稱:proj,代碼行數:20,代碼來源:mailboxprofiles.php

示例14: delete

 public function delete()
 {
     $app = JFactory::getApplication();
     $cid = $app->input->get('cid', array(), 'array');
     if (!empty($cid)) {
         $db = JFactory::getDbo();
         $query = "SELECT COUNT(*) FROM #__judirectory_criterias_values WHERE criteria_id IN(" . implode(',', $cid) . ")";
         $db->setQuery($query);
         $result = $db->loadResult();
         if ($result) {
             JError::raiseNotice(500, "Please Rebuild rating !");
         }
     }
     parent::delete();
 }
開發者ID:ranrolls,項目名稱:ras-full-portal,代碼行數:15,代碼來源:criterias.php

示例15: delete

 function delete()
 {
     if (!igGeneralHelper::authorise('core.admin')) {
         return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     if (!igGeneralHelper::authorise('core.delete')) {
         return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     $model = $this->getModel();
     if (!$model->checkAssigned()) {
         $this->setRedirect('index.php?option=com_igallery&view=profiles');
         return;
     }
     parent::delete();
 }
開發者ID:iFactoryDigital,項目名稱:gympieradiology,代碼行數:15,代碼來源:profiles.php


注:本文中的JControllerAdmin::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。