本文整理汇总了PHP中Am_Controller::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Controller::init方法的具体用法?PHP Am_Controller::init怎么用?PHP Am_Controller::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Controller
的用法示例。
在下文中一共展示了Am_Controller::init方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
parent::init();
$this->loadCart();
$this->view->cart = $this->cart;
$this->getDi()->blocks->add(new Am_Block('cart/right', ___('Search Products'), 'cart-search', $this->getModule(), 'search.phtml', Am_Block::TOP))->add(new Am_Block('cart/right', ___('Your Basket'), 'cart-basket', $this->getModule(), 'basket.phtml', Am_Block::TOP))->add(new Am_Block('cart/right', ___('Authentication'), 'cart-auth', $this->getModule(), 'auth.phtml'));
}
示例2: init
public function init()
{
$this->strategy = $this->getDi()->helpdeskStrategy;
$type = defined('AM_ADMIN') ? 'admin' : 'user';
$this->getView()->headLink()->appendStylesheet($this->getView()->_scriptCss('helpdesk-' . $type . '.css'));
parent::init();
}
示例3: init
public function init()
{
parent::init();
set_time_limit(0);
ignore_user_abort(true);
@ini_set('memory_limit', '256M');
}
示例4: init
public function init()
{
parent::init();
$this->loadCart();
$this->view->cart = $this->cart;
$cc = $this->getCategoryCode();
$this->view->cc = $cc;
$cats = explode(',', $this->getRequest()->getCookie('am-cart-cats', ''));
if (!in_array($cc, $cats)) {
$cats[] = $cc;
$this->setCookie('am-cart-cats', implode(',', $cats));
}
$this->hiddenCatCodes = $cats;
$this->view->productCategoryOptions = array(null => ___('-- Select Category --')) + $this->getDi()->productCategoryTable->getUserSelectOptions(array(ProductCategoryTable::EXCLUDE_EMPTY => true, ProductCategoryTable::COUNT => true, ProductCategoryTable::EXCLUDE_HIDDEN => true, ProductCategoryTable::INCLUDE_HIDDEN => $this->getHiddenCatCodes(), ProductCategoryTable::ROOT => $this->getModule()->getConfig('category_id', null)));
if (!$this->getModule()->getConfig('layout_no_category')) {
$this->getDi()->blocks->add(new Am_Block('cart/right', ___('Category'), 'cart-category', $this->getModule(), 'category.phtml', Am_Block::TOP));
}
if (!$this->getModule()->getConfig('layout_no_search')) {
$this->getDi()->blocks->add(new Am_Block('cart/right', ___('Search Products'), 'cart-search', $this->getModule(), 'search.phtml', Am_Block::TOP));
}
if (!$this->getModule()->getConfig('layout_no_basket')) {
$this->getDi()->blocks->add(new Am_Block('cart/right', ___('Your Basket'), 'cart-basket', $this->getModule(), 'basket.phtml', Am_Block::TOP));
}
if (!$this->getModule()->getConfig('layout_no_auth')) {
$this->getDi()->blocks->add(new Am_Block('cart/right', ___('Authentication'), 'cart-auth', $this->getModule(), 'auth.phtml'));
}
}
示例5: init
function init()
{
if (!class_exists('Am_Form_Brick', false)) {
class_exists('Am_Form_Brick', true);
Am_Di::getInstance()->hook->call(Am_Event::LOAD_BRICKS);
}
parent::init();
}
示例6: init
function init()
{
if (!class_exists('Am_Form_Brick', false)) {
class_exists('Am_Form_Brick', true);
Am_Di::getInstance()->hook->call(Am_Event::LOAD_BRICKS);
}
parent::init();
$this->msg = ___('We review all affiliates manually, so your affiliate account status is pending. ' . 'You will receive email when your account will be approved. Thank you for your patience.');
}
示例7: init
public function init()
{
parent::init();
try {
$options = $this->getDi()->getParameter('dirbrowser');
if (!empty($options['chroot'])) {
$this->chroot = $options['chroot'];
}
} catch (Exception $e) {
}
}
示例8: init
public function init()
{
$this->initPages();
$this->getDi()->hook->call(Am_Event::INIT_CONTROLLER_PAGES, array('controller' => $this));
parent::init();
}