当前位置: 首页>>代码示例>>PHP>>正文


PHP ModuleFrontController::init方法代码示例

本文整理汇总了PHP中ModuleFrontController::init方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleFrontController::init方法的具体用法?PHP ModuleFrontController::init怎么用?PHP ModuleFrontController::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModuleFrontController的用法示例。


在下文中一共展示了ModuleFrontController::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     /** @noinspection PhpUndefinedClassInspection */
     parent::init();
     $this->debug = $this->module->getConfigApiDebugMode();
     $this->execute();
 }
开发者ID:payin7-payments,项目名称:payin7-prestashop,代码行数:7,代码来源:notify.php

示例2: init

 public function init()
 {
     $this->page_name = 'calendar';
     $this->display_column_left = false;
     $this->display_column_right = false;
     parent::init();
 }
开发者ID:paolobattistella,项目名称:aphro,代码行数:7,代码来源:calendar.php

示例3: init

 public function init()
 {
     parent::init();
     /*
      * Piqué dans le AuthController. J'aurais bien aimé utiliser le AuthController, mais le premier contrôle dans son init()
      * c'est pour vérifier si l'utilisateur est loggé ou non, ce qui mettait à plat ma stratégie.
      *
      * Je me suis posé la question 'Faut il que ca marche pour des admin ?', j'ai supposé que non,
      * mais s'il avait fallu, il suffisait de tester un 'Employee' en plus d'un 'Customer'
      */
     $passwd = trim(Tools::getValue('passwd'));
     $_POST['passwd'] = null;
     $email = trim(Tools::getValue('email'));
     if (!empty($email) && Validate::isEmail($email) && !empty($passwd) && Validate::isPasswd($passwd)) {
         $customer = new Customer();
         $authentication = $customer->getByEmail(trim($email), trim($passwd));
         if (isset($authentication->active) && $authentication->active && $customer->id) {
             Tools::redirect(Configuration::get("ADMIN_TAB_MODULE_URLBACK"));
         }
     }
     /*
      * Ici, je ne suis vraiment pas satisfait de la méthode employée, je trouve ça plutôt crade
      * de transmettre des infos sur les erreurs via un param en GET, mais dans l'immédiat je n'ai pas trouvé mieux
      */
     Tools::redirect("index.php?urlback_haserror=1");
 }
开发者ID:ArnaudBenassy,项目名称:abenassyurlback,代码行数:26,代码来源:URLBack.php

示例4: init

 public function init()
 {
     parent::init();
     $this->id_cart = (int) Tools::getValue('id_cart', 0);
     $is_guest = false;
     /* check if the cart has been made by a Guest customer, for redirect link */
     if (Cart::isGuestCartByCartId($this->id_cart)) {
         $is_guest = true;
         $redirectLink = 'index.php?controller=guest-tracking';
     } else {
         $redirectLink = 'index.php?controller=history';
     }
     $this->id_module = (int) Tools::getValue('id_module', 0);
     $this->id_order = Order::getOrderByCartId((int) $this->id_cart);
     $this->secure_key = Tools::getValue('key', false);
     $order = new Order((int) $this->id_order);
     if ($is_guest) {
         $customer = new Customer((int) $order->id_customer);
         $redirectLink .= '&id_order=' . $order->reference . '&email=' . urlencode($customer->email);
     }
     if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) {
         Tools::redirect($redirectLink . (Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
     }
     $this->reference = $order->reference;
     if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) {
         Tools::redirect($redirectLink);
     }
     $payment_methods = $this->module->getPaymentMethods();
     if (!in_array($order->payment, $payment_methods)) {
         Tools::redirect($redirectLink);
     }
 }
开发者ID:pedalracer,项目名称:free_modules_1.5,代码行数:32,代码来源:confirmation.php

示例5: init

 public function init()
 {
     if (!$this->context->customer->isLogged()) {
         Tools::redirect($this->context->link->getPageLink('authentication', true, (int) $this->context->language->id, 'back=' . urlencode($this->context->link->getModuleLink('referralprogram', 'program'))));
     }
     parent::init();
 }
开发者ID:pankajshoffex,项目名称:shoffex_prestashop,代码行数:7,代码来源:program.php

示例6: init

 public function init()
 {
     $this->page_name = 'shop';
     $this->display_column_left = true;
     $this->display_column_right = true;
     parent::init();
 }
开发者ID:paolobattistella,项目名称:aphro,代码行数:7,代码来源:shop.php

示例7: init

 public function init()
 {
     parent::init();
     require_once $this->module->getLocalPath() . 'MailAlert.php';
     $this->id_product = (int) Tools::getValue('id_product');
     $this->id_product_attribute = (int) Tools::getValue('id_product_attribute');
 }
开发者ID:pacxs,项目名称:pacxscom,代码行数:7,代码来源:actions.php

示例8: init

 public function init()
 {
     if (!$this->context->customer->isLogged()) {
         Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php');
     }
     parent::init();
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:7,代码来源:program.php

示例9: init

 public function init()
 {
     parent::init();
     $simpleblog_post_rewrite = Tools::getValue('rewrite');
     if ($simpleblog_post_rewrite) {
         $this->simpleblog_post_rewrite = $simpleblog_post_rewrite;
     }
 }
开发者ID:OaSiis,项目名称:LDDP,代码行数:8,代码来源:single.php

示例10: init

 public function init()
 {
     parent::init();
     $this->display_column_left = false;
     $this->display_column_right = false;
     $this->display_header = false;
     $this->display_footer = false;
     $this->module->handleRequest();
 }
开发者ID:channelengine,项目名称:prestashop,代码行数:9,代码来源:Callback.php

示例11: init

 public function init()
 {
     /** @noinspection PhpUndefinedClassInspection */
     parent::init();
     $this->display_column_left = false;
     $this->display_column_right = false;
     $this->debug = $this->module->getConfigApiDebugMode();
     $this->redirect_on_error = !$this->debug;
 }
开发者ID:payin7-payments,项目名称:payin7-prestashop,代码行数:9,代码来源:_base.php

示例12: init

 public function init()
 {
     parent::init();
     if (version_compare(_PS_VERSION_, '1.5.0.0', '<')) {
         $this->context->cookie = self::$cookie;
         $this->context->smarty = self::$smarty;
     }
     $this->_setSEOTags();
     $this->_setProductFilterList();
 }
开发者ID:acreno,项目名称:pm-ps,代码行数:10,代码来源:advancedsearch4.php

示例13: init

 public function init()
 {
     Tools::switchLanguage();
     //switch language if lang param, ps bug.
     /*         * * URL MANAGEMENT ** */
     if (isset($_GET['news']) && is_numeric($_GET['news'])) {
         $this->id_news = $_GET['news'];
     }
     parent::init();
     $this->list_link = News::linkList();
 }
开发者ID:rongandat,项目名称:vatfairfoot,代码行数:11,代码来源:news.php

示例14: init

 public function init()
 {
     self::$amz_payments = new AmzPayments();
     $this->isLogged = (bool) $this->context->customer->id && Customer::customerIdExistsStatic((int) $this->context->cookie->id_customer);
     parent::init();
     /* Disable some cache related bugs on the cart/order */
     header('Cache-Control: no-cache, must-revalidate');
     header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
     $this->display_column_left = false;
     $this->display_column_right = false;
     $this->service = self::$amz_payments->getService();
 }
开发者ID:paeddl,项目名称:amzpayments-1,代码行数:12,代码来源:connect_accounts.php

示例15: init

 public function init()
 {
     Tools::switchLanguage();
     //switch language if lang param, ps bug.
     /*         * * URL MANAGEMENT ** */
     if (isset($_GET['post']) && is_numeric($_GET['post'])) {
         $this->id_post = $_GET['post'];
     } elseif (isset($_GET['category']) && is_numeric($_GET['category'])) {
         $this->id_category = (int) $_GET['category'];
     }
     parent::init();
     //        $this->list_link = Myphotos::linkList();
 }
开发者ID:rongandat,项目名称:vatfairfoot,代码行数:13,代码来源:post.php


注:本文中的ModuleFrontController::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。