poniedziałek, 1 listopada 2010

Request action!

Copied from the book:
This allows the requestAction call to bypass the usage of Router::url which can increase performance. The url based arrays are the same as the ones that HtmlHelper::link uses with one difference - if you are using named or passed parameters, you must put them in a second array and wrap them with the correct key. This is because requestAction only merges the named args array into the Controller::params member array and does not place the named args in the key 'named'.

echo $this->requestAction('/articles/view/5');
echo $this->requestAction(array('controller' => 'articles', 'action' => 'view'), array('pass' => array(5)));

Brak komentarzy:

Prześlij komentarz