Public Member Functions | |
__construct (Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs=array()) | |
hasAction ($action) | |
getRequest () | |
getResponse () | |
getFlag ($action, $flag='') | |
setFlag ($action, $flag, $value) | |
getFullActionName ($delimiter='_') | |
getLayout () | |
loadLayout ($handles=null, $generateBlocks=true, $generateXml=true) | |
addActionLayoutHandles () | |
loadLayoutUpdates () | |
generateLayoutXml () | |
generateLayoutBlocks () | |
renderLayout ($output='') | |
dispatch ($action) | |
getActionMethodName ($action) | |
preDispatch () | |
postDispatch () | |
norouteAction ($coreRoute=null) | |
noCookiesAction () | |
Public Attributes | |
const | FLAG_NO_CHECK_INSTALLATION = 'no-install-check' |
const | FLAG_NO_DISPATCH = 'no-dispatch' |
const | FLAG_NO_PRE_DISPATCH = 'no-preDispatch' |
const | FLAG_NO_POST_DISPATCH = 'no-postDispatch' |
const | FLAG_NO_START_SESSION = 'no-startSession' |
const | FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch' |
const | FLAG_NO_COOKIES_REDIRECT = 'no-cookies-redirect' |
const | PARAM_NAME_SUCCESS_URL = 'success_url' |
const | PARAM_NAME_ERROR_URL = 'error_url' |
const | PARAM_NAME_REFERER_URL = 'referer_url' |
const | PARAM_NAME_BASE64_URL = 'r64' |
const | PARAM_NAME_URL_ENCODED = 'uenc' |
const | PROFILER_KEY = 'mage::dispatch::controller::action' |
Protected Member Functions | |
_construct () | |
_forward ($action, $controller=null, $module=null, array $params=null) | |
_initLayoutMessages ($messagesStorage) | |
_redirectUrl ($url) | |
_redirect ($path, $arguments=array()) | |
_redirectSuccess ($defaultUrl) | |
_redirectError ($defaultUrl) | |
_redirectReferer ($defaultUrl=null) | |
_getRefererUrl () | |
_isUrlInternal ($url) | |
_getRealModuleName () | |
_rewrite () | |
_validateFormKey () | |
Protected Attributes | |
$_request | |
$_response | |
$_realModuleName | |
$_flags = array() | |
$_cookieCheckActions = array() |
Definition at line 37 of file Action.php.
__construct | ( | Zend_Controller_Request_Abstract $ | request, | |
Zend_Controller_Response_Abstract $ | response, | |||
array $ | invokeArgs = array() | |||
) |
Constructor
Zend_Controller_Request_Abstract | $request | |
Zend_Controller_Response_Abstract | $response | |
array | $invokeArgs |
Definition at line 99 of file Action.php.
00100 { 00101 $this->_request = $request; 00102 $this->_response= $response; 00103 00104 Mage::app()->getFrontController()->setAction($this); 00105 00106 $this->_construct(); 00107 }
_construct | ( | ) | [protected] |
Reimplemented in Mage_Adminhtml_Controller_Sales_Creditmemo, Mage_Adminhtml_Controller_Sales_Invoice, Mage_Adminhtml_Controller_Sales_Shipment, Mage_Adminhtml_Catalog_Product_Action_AttributeController, Mage_Adminhtml_Catalog_ProductController, Mage_Adminhtml_Sales_Order_CreateController, Mage_Adminhtml_Sales_Order_EditController, Mage_Adminhtml_Sales_Order_View_GiftmessageController, Mage_Adminhtml_Sales_OrderController, Mage_Adminhtml_SalesController, Mage_Adminhtml_System_ConfigController, Mage_Bundle_Product_EditController, Mage_Bundle_SelectionController, Mage_Downloadable_Product_EditController, and Mage_Install_Controller_Action.
Definition at line 109 of file Action.php.
_forward | ( | $ | action, | |
$ | controller = null , |
|||
$ | module = null , |
|||
array $ | params = null | |||
) | [protected] |
Reimplemented in Mage_Adminhtml_Controller_Action.
Definition at line 531 of file Action.php.
00532 { 00533 $request = $this->getRequest(); 00534 00535 if (!is_null($params)) { 00536 $request->setParams($params); 00537 } 00538 00539 if (!is_null($controller)) { 00540 $request->setControllerName($controller); 00541 00542 // Module should only be reset if controller has been specified 00543 if (!is_null($module)) { 00544 $request->setModuleName($module); 00545 } 00546 } 00547 00548 $request->setActionName($action) 00549 ->setDispatched(false); 00550 }
_getRealModuleName | ( | ) | [protected] |
Get real module name (like 'Mage_Module')
Definition at line 692 of file Action.php.
00693 { 00694 if (empty($this->_realModuleName)) { 00695 $class = get_class($this); 00696 $this->_realModuleName = substr( 00697 $class, 00698 0, 00699 strpos(strtolower($class), '_' . strtolower($this->getRequest()->getControllerName() . 'Controller')) 00700 ); 00701 } 00702 return $this->_realModuleName; 00703 }
_getRefererUrl | ( | ) | [protected] |
Identify referer url via all accepted methods (HTTP_REFERER, regular or base64-encoded request param)
Definition at line 648 of file Action.php.
00649 { 00650 $refererUrl = $this->getRequest()->getServer('HTTP_REFERER'); 00651 if ($url = $this->getRequest()->getParam(self::PARAM_NAME_REFERER_URL)) { 00652 $refererUrl = $url; 00653 } 00654 if ($url = $this->getRequest()->getParam(self::PARAM_NAME_BASE64_URL)) { 00655 $refererUrl = Mage::helper('core')->urlDecode($url); 00656 } 00657 if ($url = $this->getRequest()->getParam(self::PARAM_NAME_URL_ENCODED)) { 00658 $refererUrl = Mage::helper('core')->urlDecode($url); 00659 } 00660 00661 if (!$this->_isUrlInternal($refererUrl)) { 00662 $refererUrl = Mage::app()->getStore()->getBaseUrl(); 00663 } 00664 return $refererUrl; 00665 }
_initLayoutMessages | ( | $ | messagesStorage | ) | [protected] |
Definition at line 552 of file Action.php.
00553 { 00554 if ($storage = Mage::getSingleton($messagesStorage)) { 00555 $this->getLayout()->getMessagesBlock()->addMessages($storage->getMessages(true)); 00556 } 00557 else { 00558 Mage::throwException( 00559 Mage::helper('core')->__('Invalid messages storage "%s" for layout messages initialization', (string)$messagesStorage) 00560 ); 00561 } 00562 return $this; 00563 }
_isUrlInternal | ( | $ | url | ) | [protected] |
Check url to be used as internal
string | $url |
Url must start from base secure or base unsecure url
Definition at line 673 of file Action.php.
00674 { 00675 if (strpos($url, 'http') !== false) { 00676 /** 00677 * Url must start from base secure or base unsecure url 00678 */ 00679 if ((strpos($url, Mage::app()->getStore()->getBaseUrl()) === 0) 00680 || (strpos($url, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true)) === 0)) { 00681 return true; 00682 } 00683 } 00684 return false; 00685 }
_redirect | ( | $ | path, | |
$ | arguments = array() | |||
) | [protected] |
Set redirect into responce
string | $path | |
array | $arguments |
Reimplemented in Mage_Adminhtml_Controller_Action.
Definition at line 583 of file Action.php.
00584 { 00585 $this->getResponse()->setRedirect(Mage::getUrl($path, $arguments)); 00586 return $this; 00587 }
_redirectError | ( | $ | defaultUrl | ) | [protected] |
Redirect to error page
string | $defaultUrl |
Definition at line 612 of file Action.php.
00613 { 00614 $errorUrl = $this->getRequest()->getParam(self::PARAM_NAME_ERROR_URL); 00615 if (empty($errorUrl)) { 00616 $errorUrl = $defaultUrl; 00617 } 00618 if (!$this->_isUrlInternal($errorUrl)) { 00619 $errorUrl = Mage::app()->getStore()->getBaseUrl(); 00620 } 00621 $this->getResponse()->setRedirect($errorUrl); 00622 return $this; 00623 }
_redirectReferer | ( | $ | defaultUrl = null |
) | [protected] |
Set referer url for redirect in responce
string | $defaultUrl |
Reimplemented in Mage_Adminhtml_Controller_Action.
Definition at line 631 of file Action.php.
00632 { 00633 00634 $refererUrl = $this->_getRefererUrl(); 00635 if (empty($refererUrl)) { 00636 $refererUrl = empty($defaultUrl) ? Mage::getBaseUrl() : $defaultUrl; 00637 } 00638 00639 $this->getResponse()->setRedirect($refererUrl); 00640 return $this; 00641 }
_redirectSuccess | ( | $ | defaultUrl | ) | [protected] |
Redirect to success page
string | $defaultUrl |
Definition at line 594 of file Action.php.
00595 { 00596 $successUrl = $this->getRequest()->getParam(self::PARAM_NAME_SUCCESS_URL); 00597 if (empty($successUrl)) { 00598 $successUrl = $defaultUrl; 00599 } 00600 if (!$this->_isUrlInternal($successUrl)) { 00601 $successUrl = Mage::app()->getStore()->getBaseUrl(); 00602 } 00603 $this->getResponse()->setRedirect($successUrl); 00604 return $this; 00605 }
_redirectUrl | ( | $ | url | ) | [protected] |
Set redirect url into response
string | $url |
Definition at line 571 of file Action.php.
00572 { 00573 $this->getResponse()->setRedirect($url); 00574 return $this; 00575 }
_rewrite | ( | ) | [protected] |
Support for controllers rewrites
Example of configuration: <global> <routers> <core_module> <rewrite> <core_controller> <to>new_route/new_controller</to> <override_actions>true</override_actions> <actions> <core_action><to>new_module/new_controller/new_action</core_action> </actions> <core_controller> </rewrite> </core_module> </routers> </global>
This will override: 1. core_module/core_controller/core_action to new_module/new_controller/new_action 2. all other actions of core_module/core_controller to new_module/new_controller
Definition at line 731 of file Action.php.
00732 { 00733 $route = $this->getRequest()->getRouteName(); 00734 $controller = $this->getRequest()->getControllerName(); 00735 $action = $this->getRequest()->getActionName(); 00736 00737 $rewrite = Mage::getConfig()->getNode('global/routers/'.$route.'/rewrite/'.$controller); 00738 if (!$rewrite) { 00739 return false; 00740 } 00741 00742 if (!($rewrite->actions && $rewrite->actions->$action) || $rewrite->is('override_actions')) { 00743 $t = explode('/', (string)$rewrite->to); 00744 if (sizeof($t)!==2 || empty($t[0]) || empty($t[1])) { 00745 return false; 00746 } 00747 $t[2] = $action; 00748 } else { 00749 $t = explode('/', (string)$rewrite->actions->$action->to); 00750 if (sizeof($t)!==3 || empty($t[0]) || empty($t[1]) || empty($t[2])) { 00751 return false; 00752 } 00753 } 00754 00755 $this->_forward( 00756 $t[2]==='*' ? $action : $t[2], 00757 $t[1]==='*' ? $controller : $t[1], 00758 $t[0]==='*' ? $route : $t[0] 00759 ); 00760 00761 return true; 00762 }
_validateFormKey | ( | ) | [protected] |
Validate Form Key
Definition at line 769 of file Action.php.
00770 { 00771 if (!($formKey = $this->getRequest()->getParam('form_key', null)) 00772 || $formKey != Mage::getSingleton('core/session')->getFormKey()) { 00773 return false; 00774 } 00775 return true; 00776 }
addActionLayoutHandles | ( | ) |
Definition at line 236 of file Action.php.
00237 { 00238 $update = $this->getLayout()->getUpdate(); 00239 00240 // load store handle 00241 $update->addHandle('STORE_'.Mage::app()->getStore()->getCode()); 00242 00243 // load theme handle 00244 $package = Mage::getSingleton('core/design_package'); 00245 $update->addHandle('THEME_'.$package->getArea().'_'.$package->getPackageName().'_'.$package->getTheme('layout')); 00246 00247 // load action handle 00248 $update->addHandle(strtolower($this->getFullActionName())); 00249 00250 return $this; 00251 }
dispatch | ( | $ | action | ) |
preDispatch() didn't change the action, so we can continue
Definition at line 355 of file Action.php.
00356 { 00357 try { 00358 $actionMethodName = $this->getActionMethodName($action); 00359 00360 if (!is_callable(array($this, $actionMethodName))) { 00361 $actionMethodName = 'norouteAction'; 00362 } 00363 00364 Varien_Profiler::start(self::PROFILER_KEY.'::predispatch'); 00365 $this->preDispatch(); 00366 Varien_Profiler::stop(self::PROFILER_KEY.'::predispatch'); 00367 00368 if ($this->getRequest()->isDispatched()) { 00369 /** 00370 * preDispatch() didn't change the action, so we can continue 00371 */ 00372 if (!$this->getFlag('', self::FLAG_NO_DISPATCH)) { 00373 $_profilerKey = self::PROFILER_KEY.'::'.$this->getFullActionName(); 00374 00375 Varien_Profiler::start($_profilerKey); 00376 $this->$actionMethodName(); 00377 Varien_Profiler::stop($_profilerKey); 00378 00379 Varien_Profiler::start(self::PROFILER_KEY.'::postdispatch'); 00380 $this->postDispatch(); 00381 Varien_Profiler::stop(self::PROFILER_KEY.'::postdispatch'); 00382 } 00383 } 00384 } 00385 catch (Mage_Core_Controller_Varien_Exception $e) { 00386 // set prepared flags 00387 foreach ($e->getResultFlags() as $flagData) { 00388 list($action, $flag, $value) = $flagData; 00389 $this->setFlag($action, $flag, $value); 00390 } 00391 // call forward, redirect or an action 00392 list($method, $parameters) = $e->getResultCallback(); 00393 switch ($method) { 00394 case Mage_Core_Controller_Varien_Exception::RESULT_REDIRECT: 00395 list($path, $arguments) = $parameters; 00396 $this->_redirect($path, $arguments); 00397 break; 00398 case Mage_Core_Controller_Varien_Exception::RESULT_FORWARD: 00399 list($action, $controller, $module, $params) = $parameters; 00400 $this->_forward($action, $controller, $module, $params); 00401 break; 00402 default: 00403 $actionMethodName = $this->getActionMethodName($method); 00404 $this->getRequest()->setActionName($method); 00405 $this->$actionMethodName($method); 00406 break; 00407 } 00408 } 00409 }
generateLayoutBlocks | ( | ) |
Definition at line 290 of file Action.php.
00291 { 00292 $_profilerKey = self::PROFILER_KEY . '::' . $this->getFullActionName(); 00293 // dispatch event for adding xml layout elements 00294 if(!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { 00295 Mage::dispatchEvent( 00296 'controller_action_layout_generate_blocks_before', 00297 array('action'=>$this, 'layout'=>$this->getLayout()) 00298 ); 00299 } 00300 00301 // generate blocks from xml layout 00302 Varien_Profiler::start("$_profilerKey::layout_generate_blocks"); 00303 $this->getLayout()->generateBlocks(); 00304 Varien_Profiler::stop("$_profilerKey::layout_generate_blocks"); 00305 00306 if(!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { 00307 Mage::dispatchEvent( 00308 'controller_action_layout_generate_blocks_after', 00309 array('action'=>$this, 'layout'=>$this->getLayout()) 00310 ); 00311 } 00312 00313 return $this; 00314 }
generateLayoutXml | ( | ) |
Definition at line 271 of file Action.php.
00272 { 00273 $_profilerKey = self::PROFILER_KEY . '::' . $this->getFullActionName(); 00274 // dispatch event for adding text layouts 00275 if(!$this->getFlag('', self::FLAG_NO_DISPATCH_BLOCK_EVENT)) { 00276 Mage::dispatchEvent( 00277 'controller_action_layout_generate_xml_before', 00278 array('action'=>$this, 'layout'=>$this->getLayout()) 00279 ); 00280 } 00281 00282 // generate xml from collected text updates 00283 Varien_Profiler::start("$_profilerKey::layout_generate_xml"); 00284 $this->getLayout()->generateXml(); 00285 Varien_Profiler::stop("$_profilerKey::layout_generate_xml"); 00286 00287 return $this; 00288 }
getActionMethodName | ( | $ | action | ) |
getFlag | ( | $ | action, | |
$ | flag = '' | |||
) |
Retrieve flag value
string | $action | |
string | $flag |
Definition at line 146 of file Action.php.
00147 { 00148 if (''===$action) { 00149 $action = $this->getRequest()->getActionName(); 00150 } 00151 if (''===$flag) { 00152 return $this->_flags; 00153 } 00154 elseif (isset($this->_flags[$action][$flag])) { 00155 return $this->_flags[$action][$flag]; 00156 } 00157 else { 00158 return false; 00159 } 00160 }
getFullActionName | ( | $ | delimiter = '_' |
) |
Retrieve full bane of current action current controller and current module
string | $delimiter |
Definition at line 186 of file Action.php.
00187 { 00188 return $this->getRequest()->getRouteName().$delimiter. 00189 $this->getRequest()->getControllerName().$delimiter. 00190 $this->getRequest()->getActionName(); 00191 }
getLayout | ( | ) |
Retrieve current layout object
Definition at line 198 of file Action.php.
00199 { 00200 return Mage::getSingleton('core/layout'); 00201 }
getRequest | ( | ) |
getResponse | ( | ) |
hasAction | ( | $ | action | ) |
Definition at line 114 of file Action.php.
00115 { 00116 return is_callable(array($this, $this->getActionMethodName($action))); 00117 }
Load layout by handles(s)
string | $handles | |
string | $cacheId | |
boolean | $generateBlocks |
Reimplemented in Mage_Adminhtml_Controller_Action.
Definition at line 211 of file Action.php.
00212 { 00213 // if handles were specified in arguments load them first 00214 if (false!==$handles && ''!==$handles) { 00215 $this->getLayout()->getUpdate()->addHandle($handles ? $handles : 'default'); 00216 } 00217 00218 // add default layout handles for this action 00219 $this->addActionLayoutHandles(); 00220 00221 $this->loadLayoutUpdates(); 00222 00223 if (!$generateXml) { 00224 return $this; 00225 } 00226 $this->generateLayoutXml(); 00227 00228 if (!$generateBlocks) { 00229 return $this; 00230 } 00231 $this->generateLayoutBlocks(); 00232 00233 return $this; 00234 }
loadLayoutUpdates | ( | ) |
Definition at line 253 of file Action.php.
00254 { 00255 $_profilerKey = self::PROFILER_KEY . '::' .$this->getFullActionName(); 00256 00257 // dispatch event for adding handles to layout update 00258 Mage::dispatchEvent( 00259 'controller_action_layout_load_before', 00260 array('action'=>$this, 'layout'=>$this->getLayout()) 00261 ); 00262 00263 // load layout updates by specified handles 00264 Varien_Profiler::start("$_profilerKey::layout_load"); 00265 $this->getLayout()->getUpdate()->load(); 00266 Varien_Profiler::stop("$_profilerKey::layout_load"); 00267 00268 return $this; 00269 }
noCookiesAction | ( | ) |
Reimplemented in Mage_Cms_IndexController.
Definition at line 509 of file Action.php.
00510 { 00511 $redirect = new Varien_Object(); 00512 Mage::dispatchEvent('controller_action_nocookies', array( 00513 'action' => $this, 00514 'redirect' => $redirect 00515 )); 00516 00517 if ($url = $redirect->getRedirectUrl()) { 00518 $this->_redirectUrl($url); 00519 } 00520 elseif ($redirect->getRedirect()) { 00521 $this->_redirect($redirect->getPath(), $redirect->getArguments()); 00522 } 00523 else { 00524 $this->loadLayout(array('default', 'noCookie')); 00525 $this->renderLayout(); 00526 } 00527 00528 $this->getRequest()->setDispatched(true); 00529 }
norouteAction | ( | $ | coreRoute = null |
) |
Reimplemented in Mage_Adminhtml_Controller_Action.
Definition at line 486 of file Action.php.
00487 { 00488 $status = ( $this->getRequest()->getParam('__status__') ) 00489 ? $this->getRequest()->getParam('__status__') 00490 : new Varien_Object(); 00491 00492 Mage::dispatchEvent('controller_action_noroute', array('action'=>$this, 'status'=>$status)); 00493 if ($status->getLoaded() !== true 00494 || $status->getForwarded() === true 00495 || !is_null($coreRoute) ) { 00496 $this->loadLayout(array('default', 'noRoute')); 00497 $this->renderLayout(); 00498 } else { 00499 $status->setForwarded(true); 00500 #$this->_forward('cmsNoRoute', 'index', 'cms'); 00501 $this->_forward( 00502 $status->getForwardAction(), 00503 $status->getForwardController(), 00504 $status->getForwardModule(), 00505 array('__status__' => $status)); 00506 } 00507 }
postDispatch | ( | ) |
Dispatches event after action
Reimplemented in Mage_Core_Controller_Front_Action.
Definition at line 469 of file Action.php.
00470 { 00471 if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) { 00472 return; 00473 } 00474 00475 Mage::dispatchEvent( 00476 'controller_action_postdispatch_'.$this->getFullActionName(), 00477 array('controller_action'=>$this) 00478 ); 00479 Mage::dispatchEvent( 00480 'controller_action_postdispatch_'.$this->getRequest()->getRouteName(), 00481 array('controller_action'=>$this) 00482 ); 00483 Mage::dispatchEvent('controller_action_postdispatch', array('controller_action'=>$this)); 00484 }
preDispatch | ( | ) |
Dispatches event before action
Reimplemented in Mage_Adminhtml_Controller_Action, Mage_Adminhtml_Catalog_Product_AttributeController, Mage_Adminhtml_Rss_CatalogController, Mage_Adminhtml_Rss_OrderController, Mage_Api_Controller_Action, Mage_Catalog_Seo_SitemapController, Mage_CatalogSearch_TermController, Mage_Checkout_MultishippingController, Mage_Checkout_OnepageController, Mage_Compiler_ProcessController, Mage_Contacts_IndexController, Mage_Core_Controller_Front_Action, Mage_Customer_AccountController, Mage_Customer_AddressController, Mage_Downloadable_CustomerController, Mage_Install_IndexController, Mage_Install_WizardController, Mage_Newsletter_ManageController, Mage_ProductAlert_AddController, Mage_ProductAlert_UnsubscribeController, Mage_Review_ProductController, Mage_Sales_OrderController, and Mage_Wishlist_IndexController.
Definition at line 420 of file Action.php.
00421 { 00422 if (!$this->getFlag('', self::FLAG_NO_CHECK_INSTALLATION)) { 00423 if (!Mage::isInstalled()) { 00424 $this->setFlag('', self::FLAG_NO_DISPATCH, true); 00425 $this->_redirect('install'); 00426 return; 00427 } 00428 } 00429 00430 if ($this->_rewrite()) { 00431 return; 00432 } 00433 00434 if (!$this->getFlag('', self::FLAG_NO_START_SESSION)) { 00435 $namespace = $this->getLayout()->getArea(); 00436 $checkCookie = in_array($this->getRequest()->getActionName(), $this->_cookieCheckActions); 00437 if ($checkCookie && !Mage::getSingleton('core/cookie')->get($namespace)) { 00438 $this->setFlag('', self::FLAG_NO_COOKIES_REDIRECT, true); 00439 } 00440 Mage::getSingleton('core/session', array('name' => $namespace))->start(); 00441 } 00442 00443 Mage::app()->loadArea($this->getLayout()->getArea()); 00444 00445 if ($this->getFlag('', self::FLAG_NO_COOKIES_REDIRECT) && Mage::getStoreConfig('web/browser_capabilities/cookies')) { 00446 $this->_forward('noCookies', 'index', 'core'); 00447 return; 00448 } 00449 00450 if ($this->getFlag('', self::FLAG_NO_PRE_DISPATCH)) { 00451 return; 00452 } 00453 00454 Mage::dispatchEvent('controller_action_predispatch', array('controller_action'=>$this)); 00455 Mage::dispatchEvent( 00456 'controller_action_predispatch_'.$this->getRequest()->getRouteName(), 00457 array('controller_action'=>$this) 00458 ); 00459 Varien_Autoload::registerScope($this->getRequest()->getRouteName()); 00460 Mage::dispatchEvent( 00461 'controller_action_predispatch_'.$this->getFullActionName(), 00462 array('controller_action'=>$this) 00463 ); 00464 }
renderLayout | ( | $ | output = '' |
) |
Rendering layout
string | $output |
Definition at line 322 of file Action.php.
00323 { 00324 $_profilerKey = self::PROFILER_KEY . '::' . $this->getFullActionName(); 00325 00326 if ($this->getFlag('', 'no-renderLayout')) { 00327 return; 00328 } 00329 00330 if (Mage::app()->getFrontController()->getNoRender()) { 00331 return; 00332 } 00333 00334 Varien_Profiler::start("$_profilerKey::layout_render"); 00335 00336 00337 if (''!==$output) { 00338 $this->getLayout()->addOutputBlock($output); 00339 } 00340 00341 Mage::dispatchEvent('controller_action_layout_render_before'); 00342 Mage::dispatchEvent('controller_action_layout_render_before_'.$this->getFullActionName()); 00343 00344 #ob_implicit_flush(); 00345 $this->getLayout()->setDirectOutput(false); 00346 00347 $output = $this->getLayout()->getOutput(); 00348 00349 $this->getResponse()->appendBody($output); 00350 Varien_Profiler::stop("$_profilerKey::layout_render"); 00351 00352 return $this; 00353 }
setFlag | ( | $ | action, | |
$ | flag, | |||
$ | value | |||
) |
Setting flag value
string | $action | |
string | $flag | |
string | $value |
Definition at line 170 of file Action.php.
00171 { 00172 if (''===$action) { 00173 $action = $this->getRequest()->getActionName(); 00174 } 00175 $this->_flags[$action][$flag] = $value; 00176 return $this; 00177 }
$_cookieCheckActions = array() [protected] |
Reimplemented in Mage_Catalog_Product_CompareController, Mage_Checkout_CartController, Mage_Customer_AccountController, Mage_Poll_VoteController, Mage_Review_ProductController, and Mage_Wishlist_IndexController.
Definition at line 90 of file Action.php.
$_flags = array() [protected] |
Definition at line 83 of file Action.php.
$_realModuleName [protected] |
Definition at line 74 of file Action.php.
$_request [protected] |
Definition at line 60 of file Action.php.
$_response [protected] |
Definition at line 67 of file Action.php.
const FLAG_NO_CHECK_INSTALLATION = 'no-install-check' |
Definition at line 39 of file Action.php.
const FLAG_NO_COOKIES_REDIRECT = 'no-cookies-redirect' |
Definition at line 45 of file Action.php.
const FLAG_NO_DISPATCH = 'no-dispatch' |
Definition at line 40 of file Action.php.
const FLAG_NO_DISPATCH_BLOCK_EVENT = 'no-beforeGenerateLayoutBlocksDispatch' |
Definition at line 44 of file Action.php.
const FLAG_NO_POST_DISPATCH = 'no-postDispatch' |
Definition at line 42 of file Action.php.
const FLAG_NO_PRE_DISPATCH = 'no-preDispatch' |
Definition at line 41 of file Action.php.
const FLAG_NO_START_SESSION = 'no-startSession' |
Definition at line 43 of file Action.php.
const PARAM_NAME_BASE64_URL = 'r64' |
Definition at line 50 of file Action.php.
const PARAM_NAME_ERROR_URL = 'error_url' |
Definition at line 48 of file Action.php.
const PARAM_NAME_REFERER_URL = 'referer_url' |
Definition at line 49 of file Action.php.
const PARAM_NAME_SUCCESS_URL = 'success_url' |
Definition at line 47 of file Action.php.
const PARAM_NAME_URL_ENCODED = 'uenc' |
Definition at line 51 of file Action.php.
const PROFILER_KEY = 'mage::dispatch::controller::action' |
Definition at line 53 of file Action.php.