You are here

public function StateItem::isEmpty in State Machine 8

Determines whether the data structure is empty.

Return value

bool TRUE if the data structure is empty, FALSE otherwise.

Overrides Map::isEmpty

File

src/Plugin/Field/FieldType/StateItem.php, line 122

Class

StateItem
Plugin implementation of the 'state' field type.

Namespace

Drupal\state_machine\Plugin\Field\FieldType

Code

public function isEmpty() {

  // Note that in this field's case the value will never be empty
  // because of the default returned in applyDefaultValue().
  return $this->value === NULL || $this->value === '';
}