abstract class WorkflowD7Base in Workflow 7.2
Same name and namespace in other branches
- 7 includes/Field/WorkflowD7Base.php \WorkflowD7Base
Hierarchy
- class \WorkflowD7Base
Expanded class hierarchy of WorkflowD7Base
File
- includes/
Field/ WorkflowD7Base.php, line 13 - Contains workflow\includes\Field\WorkflowD7Base.
View source
abstract class WorkflowD7Base {
// Properties for Field and Widget.
protected $field = array();
protected $instance = array();
// Properties for Field.
protected $entity = NULL;
protected $entity_type = '';
/**
* Constructor, stub for D8 WidgetBase.
*/
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;
}
public function getField() {
return $this->field;
}
public function getInstance() {
return $this->instance;
}
public function delete() {
}
protected function getSettings() {
$settings = isset($this->instance['widget']['settings']) ? $this->instance['widget']['settings'] : array();
$field_info = self::settings();
return $settings += $field_info['workflow']['settings'];
}
protected function getSetting($key) {
if (isset($this->instance['widget']['settings'][$key])) {
return $this->instance['widget']['settings'][$key];
}
else {
$field_info = $this
->settings();
return $field_info['workflow']['settings'][$key];
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WorkflowD7Base:: |
protected | property | ||
WorkflowD7Base:: |
protected | property | ||
WorkflowD7Base:: |
protected | property | ||
WorkflowD7Base:: |
protected | property | ||
WorkflowD7Base:: |
public | function | ||
WorkflowD7Base:: |
public | function | ||
WorkflowD7Base:: |
public | function | ||
WorkflowD7Base:: |
protected | function | ||
WorkflowD7Base:: |
protected | function | ||
WorkflowD7Base:: |
public | function | Constructor, stub for D8 WidgetBase. |