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


PHP ModuleAdminController::initProcess方法代碼示例

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


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

示例1: initProcess

 /**
  * Adds no_follow toggle action to process routing
  */
 public function initProcess()
 {
     parent::initProcess();
     // @TODO Refactor 'if' statement to match other controllers, the way they add extra actions
     if (empty($this->action) && Tools::getValue($this->identifier)) {
         if (Tools::getIsset('no_follow' . $this->table) || Tools::getIsset('no_follow')) {
             if ($this->tabAccess['edit'] === '1') {
                 $this->action = 'no_follow';
             } else {
                 $this->errors[] = Tools::displayError('You do not have permission to edit this.');
             }
         }
     }
 }
開發者ID:gskema,項目名稱:community-theme-16,代碼行數:17,代碼來源:AdminCTTopMenuItemController.php

示例2: initProcess

 /**
  * @return mixed
  */
 public function initProcess()
 {
     if (Tools::getIsset('detailsnow_block_cms_footer_column')) {
         $this->list_id = 'details';
         if (isset($_POST['submitReset' . $this->list_id])) {
             $this->processResetFilters();
         }
     } elseif (Tools::getIsset('addnow_block_cms_footer') || Tools::getIsset('updatenow_block_cms_footer')) {
         if ($this->tabAccess['add'] === '1') {
             $this->action = 'new';
             $this->display = 'add';
         } else {
             $this->errors[] = Tools::displayError('You do not have permission to add this.');
         }
     } else {
         $this->list_id = 'column';
     }
     return parent::initProcess();
 }
開發者ID:TheTypoMaster,項目名稱:neonflexible,代碼行數:22,代碼來源:AdminNowBlockFooterCms.php

示例3: initProcess

 public function initProcess()
 {
     parent::initProcess();
 }
開發者ID:qant,項目名稱:russianpostcarrier,代碼行數:4,代碼來源:adminrussianpost.php

示例4: initProcess

 /**
  * @see ModuleAdminController::initProcess()
  */
 public function initProcess()
 {
     $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
     parent::initProcess();
 }
開發者ID:xanou,項目名稱:lexikotron,代碼行數:8,代碼來源:adminglossary.php

示例5: initProcess

 public function initProcess()
 {
     if (!$this->action) {
         parent::initProcess();
     } else {
         $this->id_object = (int) Tools::getValue($this->identifier);
     }
 }
開發者ID:paolobattistella,項目名稱:aphro,代碼行數:8,代碼來源:AdminAphToolsController.php

示例6: initProcess

 public function initProcess()
 {
     // Are we working on feature values?
     if (Tools::getValue('id_feature_value') || Tools::isSubmit('deletefeature_value') || Tools::isSubmit('submitAddfeature_value') || Tools::isSubmit('addfeature_value') || Tools::isSubmit('updatefeature_value') || Tools::isSubmit('submitBulkdeletefeature_value')) {
         $this->setTypeValue();
     }
     if (Tools::getIsset('viewfeature')) {
         $this->list_id = 'feature_value';
         $this->_defaultOrderBy = 'position';
         $this->_defaultOrderWay = 'ASC';
         if (isset($_POST['submitReset' . $this->list_id])) {
             $this->processResetFilters();
         }
     } else {
         $this->list_id = 'feature';
         $this->_defaultOrderBy = 'position';
         $this->_defaultOrderWay = 'ASC';
     }
     parent::initProcess();
 }
開發者ID:TheTypoMaster,項目名稱:neonflexible,代碼行數:20,代碼來源:AdminNowFeaturesController.php

示例7: initProcess

 public function initProcess()
 {
     if (Tools::isSubmit('submitAddproduct_shopAndStay') || Tools::isSubmit('submitAddproduct_shop')) {
         $id_product = (int) Tools::getValue('id_product');
         $id_shop = (int) Tools::getValue('id_shop');
         $this->object = new Product($id_product, false, (int) Context::getContext()->language->id, $id_shop);
     }
     if (!$this->action) {
         parent::initProcess();
     } else {
         list($this->id_product, $this->id_shop) = explode('-', Tools::getValue('id_ps'));
         $this->id_object = Tools::getValue('id_ps');
     }
 }
開發者ID:paolobattistella,項目名稱:aphro,代碼行數:14,代碼來源:AdminAphLongPricesController.php

示例8: initProcess

 public function initProcess()
 {
     parent::initProcess();
     if (Tools::isSubmit('deleteImg') && Tools::getValue('id_img')) {
         $this->action = 'postimage';
     }
 }
開發者ID:rongandat,項目名稱:vatfairfoot,代碼行數:7,代碼來源:AdminBlogPosts.php

示例9: initProcess

 public function initProcess()
 {
     // Shop images management
     if (Tools::getValue('id_image') && Tools::getValue('ajax')) {
         if ($this->tabAccess['edit'] === '1') {
             $this->action = 'image';
         } else {
             $this->errors[] = Tools::displayError('You do not have permission to edit this.');
         }
     } elseif (Tools::isSubmit('id_shop')) {
         $post_max_size = Tools::getMaxUploadSize(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1024 * 1024);
         if ($post_max_size && isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] && $_SERVER['CONTENT_LENGTH'] > $post_max_size) {
             $this->errors[] = sprintf(Tools::displayError('The uploaded file exceeds the "Maximum size for a downloadable product" set in preferences (%1$dMB) or the post_max_size/ directive in php.ini (%2$dMB).'), number_format(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE')), $post_max_size / 1024 / 1024);
         }
     }
     if (!$this->action) {
         parent::initProcess();
     } else {
         $this->id_object = (int) Tools::getValue($this->identifier);
     }
     if (isset($this->available_tabs[Tools::getValue('key_tab')])) {
         $this->tab_display = Tools::getValue('key_tab');
     }
     // Set tab to display if not decided already
     if (!$this->tab_display && $this->action) {
         if (in_array($this->action, array_keys($this->available_tabs))) {
             $this->tab_display = $this->action;
         }
     }
     // And if still not set, use default
     if (!$this->tab_display) {
         if (in_array($this->default_tab, $this->available_tabs)) {
             $this->tab_display = $this->default_tab;
         } else {
             $this->tab_display = key($this->available_tabs);
         }
     }
 }
開發者ID:paolobattistella,項目名稱:aphro,代碼行數:38,代碼來源:AdminAphStoresController.php

示例10: initProcess

 public function initProcess()
 {
     // Product images management
     if (Tools::getValue('id_image') && Tools::getValue('ajax')) {
         if ($this->tabAccess['edit'] === '1') {
             $this->action = 'image';
         } else {
             $this->errors[] = Tools::displayError('You do not have permission to edit this.');
         }
     } elseif (Tools::isSubmit('id_product')) {
         $post_max_size = Tools::getMaxUploadSize(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE') * 1024 * 1024);
         if ($post_max_size && isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] && $_SERVER['CONTENT_LENGTH'] > $post_max_size) {
             $this->errors[] = sprintf(Tools::displayError('The uploaded file exceeds the "Maximum size for a downloadable product" set in preferences (%1$dMB) or the post_max_size/ directive in php.ini (%2$dMB).'), number_format(Configuration::get('PS_LIMIT_UPLOAD_FILE_VALUE')), $post_max_size / 1024 / 1024);
         }
     }
     if (!$this->action) {
         parent::initProcess();
     } else {
         $this->id_object = (int) Tools::getValue($this->identifier);
     }
 }
開發者ID:paolobattistella,項目名稱:aphro,代碼行數:21,代碼來源:AdminAphStoreController.php


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