You are here

public function WorkflowD7Base::__construct in Workflow 7.2

Same name and namespace in other branches
  1. 7 includes/Field/WorkflowD7Base.php \WorkflowD7Base::__construct()

Constructor, stub for D8 WidgetBase.

File

includes/Field/WorkflowD7Base.php, line 24
Contains workflow\includes\Field\WorkflowD7Base.

Class

WorkflowD7Base

Code

public function __construct(array $field, array $instance, $entity_type = '', $entity = NULL) {
  if (!empty($entity) && !is_object($entity)) {
    throw new Exception('Entity should be an object.');
  }

  // Properties for Widget and Field.
  $this->field = $field;
  $this->instance = $instance;

  // Properties for FieldItem.
  $this->entity = $entity;
  $this->entity_type = $entity_type;
}