API Docs for: 1.0.0
Show:

eZ.Processable Class

View extension providing the concept of processor. The processors are run after the event indicated by the _processEvent property.

Item Index

Properties

Attributes

Methods

_process

(
  • [event]
)
protected

Loops through the processors to run them on the view.

Parameters:

  • [event] EventFacade optional

    the event parameters of the event triggering the process (if any)

addProcessor

(
  • processor
  • priority
)

Adds a processor to the list with the given priority. A processor is an object that should have a process method. When run, the processor will receive the view being processed.

Parameters:

  • processor Object
  • priority Number

removeProcessor

(
  • matchingFn
)

Removes one or several processors matching the given matchingFn function.

Parameters:

  • matchingFn Function

    it receives the processor and if it returns a truthy value, the corresponding processor is excluded from the list.

Properties

_processEvent

String | Array

Holds the event(s) after which the processing should be triggered.

Attributes

priority

Array readonly

Holds the processors. Each entry is an object containing 2 properties:

  • processor the processor
  • priority its priority