Hi guys,
there's a new feature in 0.11-svn (RC2 is coming tonight!) that
allows to switch actions into a "simple" mode.
An action running in simple mode will
- not be execute()d - control jumps directly to the view indicated by
getDefaultViewName()
- therefor not pass any validation
- not get any request data except for arguments set on the container
(as you would do when creating slots, for instance)
- not run through action filters (and therefor NOT THROUGH THE
SECURITY FILTER EITHER, MIND YOU!)
The ideal use case for simple actions are slots. Which brings me to
another addition: two new convenience methods in the view:
createForwardContainer() and createSlotContainer().
They both work like createExecutionContainer, but accept an array in
addition to a request data holder as their third argument. This array
will then be used as "parameters" in a request data holder that's
created transparently to the calling code. Also, these methods will
set an "is_forward" or "is_slot" parameter on the container. You can
use this to determine whether or not the current action/view is
running as a slot. This might come in handy:
public function isSimple()
{
return $this->container->getParameter('is_slot', false);
}
in your base action would be enough to automatically make all slots
simple!
Let me know if you have any questions.
Greetings,
David
P.S: next mail is about caching!
_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev