public function StateFlowEntity::get_event in State Machine 7.3
Return an event.
Parameters
string $key: The key of the event to return.
Return value
bool|StateMachine_Event The event object. Or FALSE if the event doesn't exist.
Overrides StateMachine::get_event
6 calls to StateFlowEntity::get_event()
- StateFlowEntity::entityPresave in modules/
state_flow_entity/ plugins/ state_flow_entity.inc - Called by hook_entity_presave().
- StateFlowEntity::entity_saved in modules/
state_flow_entity/ plugins/ state_flow_entity.inc - Called by hook_entity_insert() / hook_entity_update().
- StateFlowEntity::fire_event in modules/
state_flow_entity/ plugins/ state_flow_entity.inc - Extending fire_event() from state_machine's base.inc.
- StateFlowEntity::isDraftRevision in modules/
state_flow_entity/ plugins/ state_flow_entity.inc - Check if the current object is a draft revision.
- StateFlowEntity::on_exit_scheduled in modules/
state_flow_entity/ plugins/ state_flow_entity.inc - Remove scheduled events if the new state isn't scheduled.
File
- modules/
state_flow_entity/ plugins/ state_flow_entity.inc, line 136 - State Flow implementation of the State Machine class.
Class
- StateFlowEntity
- @file State Flow implementation of the State Machine class.
Code
public function get_event($key) {
if (is_null($key) || !array_key_exists($key, $this->events)) {
return FALSE;
}
if (is_array($this->events[$key])) {
$options = $this->events[$key];
$this->events[$key] = new StateFlow_Event($key, $this, $options);
}
return $this->events[$key];
}