Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ContextSwitch extends \Zend_Controller_Action_Helper_AjaxContext
- {
- protected $_contextKey = 'ajaxable';
- public function __construct()
- {
- parent::__construct();
- $this->addContext('ajax',array(
- 'suffix' => 'ajax',
- 'headers' => array('Content-Type' => 'application/jsonp'),
- 'callbacks' => array(
- 'init' => array($this,"initAjax"),
- )
- ));
- }
- public function initAjax(){
- \Zend_Controller_Action_HelperBroker::getStaticHelper('layout')->setLayout('ajax');
- }
- }
Add Comment
Please, Sign In to add comment