You are here

public function StateFlowEntity::__construct in State Machine 7.3

Create instance of StateMachine.

Parameters

object $object: The object to set.

Overrides StateMachine::__construct

File

modules/state_flow_entity/plugins/state_flow_entity.inc, line 18
State Flow implementation of the State Machine class.

Class

StateFlowEntity
@file State Flow implementation of the State Machine class.

Code

public function __construct($plugin = NULL) {
  $this->plugin = $plugin;
  $this
    ->set_object($plugin['object']);
  $this
    ->init($plugin['handler']['workflow_options']);
  $this
    ->set_current_state((string) $this
    ->load());
}