Esempio n. 1
0
 public function trigger($field, Trigger $trigger)
 {
     // Allow the context to be this field
     $context = $field !== NULL ? $this->find($field) : $this;
     // Set the context of the trigger
     $trigger->context($context);
     // Add the trigger to the bunch
     $context->add_validator('triggers', $trigger);
     return $this;
 }