Ticket #561 (new enhancement)

Opened 15 months ago

Last modified 3 months ago

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

SlotPopulationFilter.class.php (9.9 KB) - added by ross 15 months ago.

Change History

Changed 15 months ago by ross

  • description modified (diff)

Changed 15 months ago by ross

No longer needs a patch to agavi core - need to use [2065] or above

Changed 15 months ago by ross

  • description modified (diff)

Also it works as a global_filter - description updated

Changed 15 months ago by ross

Changed 15 months ago by ross

  • description modified (diff)

Replaced File - now hooks into the FPF without modification thanks Wombert [2066]

Changed 15 months ago by david

  • milestone changed from 0.11 to 1.0

Changed 11 months ago by david

  • severity changed from normal to major

Changed 11 months ago by david

  • has_patch set
  • summary changed from [PATCH] Slot Population Filter to Slot Population Filter

Changed 9 months ago by david

  • version 0.11.0RC5 deleted
  • milestone changed from 1.0 to 1.1

Changed 3 months ago by david

  • milestone changed from 1.1 to 1.2

Add/Change #561 (Slot Population Filter)

Author



Action
as new
 
Note: See TracTickets for help on using tickets.