Ticket #561 (new enhancement)
Slot Population Filter
| Reported by: | ross | Owned by: | david |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | filter | Version: | |
| Severity: | major | Keywords: | |
| Cc: | Patch attached: | yes |
Description (last modified by ross) (diff)
SPF
This filter automagically allows Slots to store their state, so that if they error they can be returned to the action from whence they came.
It has a few options for controlling the filter - so it can be used in multiple circumstances.
- disabled - Toggle the SPF and allow slots to determine how to handle their own errors.
- maintain_slot_context - Attempts to maintain the slot context even if there have been no validation errors (untested and may not be useful)
- slots_to_overwrite - slots information to be overridden if needs be. (i.e. it will be over write the slots to be actioned array)
- slots_to_ignore - slots information that will be ignored. (i.e. they will be removed from the slots to be actioned array)
- slots_to_add - An array of slot, that can be added for some reason (i.e. added to the slots to be actioned array)
- slot_data_to_remove - An array of keys to be removed from the request data holder. i.e. you have some PDO data that wont be serialised
All these can be modified in any view by setting an attribute to the 'org.agavi.filter.SlotPopulationFilter'
ie.
$this->context->getRequest()->setAttribute('disabled', false,
'org.agavi.filter.SlotPopulationFilter');
NO Dependencies!
- You just need agavi version -r [2066] or above
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

