You are here

public function OpignoTrueFalseFieldType::isEmpty in Opigno module 3.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldType/OpignoTrueFalseFieldType.php \Drupal\opigno_module\Plugin\Field\FieldType\OpignoTrueFalseFieldType::isEmpty()

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/OpignoTrueFalseFieldType.php, line 72

Class

OpignoTrueFalseFieldType
Plugin implementation of the 'opigno_true_false_field' field type.

Namespace

Drupal\opigno_module\Plugin\Field\FieldType

Code

public function isEmpty() {
  $value = $this
    ->get('value')
    ->getValue();
  return $value === NULL || $value === '';
}