本文整理汇总了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();
}
示例2: init
public function init()
{
$this->page_name = 'calendar';
$this->display_column_left = false;
$this->display_column_right = false;
parent::init();
}
示例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");
}
示例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);
}
}
示例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();
}
示例6: init
public function init()
{
$this->page_name = 'shop';
$this->display_column_left = true;
$this->display_column_right = true;
parent::init();
}
示例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');
}
示例8: init
public function init()
{
if (!$this->context->customer->isLogged()) {
Tools::redirect('index.php?controller=authentication&back=modules/referralprogram/referralprogram-program.php');
}
parent::init();
}
示例9: init
public function init()
{
parent::init();
$simpleblog_post_rewrite = Tools::getValue('rewrite');
if ($simpleblog_post_rewrite) {
$this->simpleblog_post_rewrite = $simpleblog_post_rewrite;
}
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}