If the slot is only used internally by the application, you can also set it to "simple" mode:
class MyAction extends ... {
public function isSimple() {
return true;
}
}
The action is then skipped entirely and Agavi jumps straight to the view given
by getDefaultViewName(), where you do not have access to any request data
except values passed in code to the slot.
Remember that in many cases, it makes sense to do this in code rather than the
layout; you typically should not have more than a few layouts and instead use
code for more dynamic situations:
class MySuccessView extends ... {
public function executeHtml($rd) {
$this->setupHtml($rd); // $this->loadLayout();
$a = new AgaviRequestDataHolder();
$a->setParameters(array(...));
$this->getLayer('content')->getSlot('foo')->setArguments($a);
}
}
- David
On 26.01.2012, at 16:40, Marius Hein wrote:
> On 26/01/12 16:03, André Fiedler / ö_konzept Zwickau wrote:
>> Hi,
>>
>>
>>
>> I´ve defined an slot in output_types.xml and tried to pass parameters to
>> this slot like this:
>>
>>
>>
>> <slot name="javascript" module="Application" action="Widgets.Foo">
>>
>> <ae:parameter name="type">javascript</ae:parameter>
>>
>> </slot>
>>
>
> You need to things that an argument comes in: An action with execute
> function and a validator.
>
> Maybe something like this is missing:
>
> <validator name="type" class="string" required="false">
> <argument>type</argument>
> </validator>
>
> Kind regards,
> Marius.
>
>
> --
> http://www.itsocks.de - Deep in their roots all flowers keep the light.
> PGP: 0x53FA79D0 (https://users.itsocks.de/~mhein/pgp/mhein.asc)
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
