You are here

public function MultiValueTestItem::isEmpty in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/entity_test_update/src/Plugin/Field/FieldType/MultiValueTestItem.php \Drupal\entity_test_update\Plugin\Field\FieldType\MultiValueTestItem::isEmpty()
  2. 10 core/modules/system/tests/modules/entity_test_update/src/Plugin/Field/FieldType/MultiValueTestItem.php \Drupal\entity_test_update\Plugin\Field\FieldType\MultiValueTestItem::isEmpty()

Determines whether the data structure is empty.

Return value

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

Overrides Map::isEmpty

File

core/modules/system/tests/modules/entity_test_update/src/Plugin/Field/FieldType/MultiValueTestItem.php, line 54

Class

MultiValueTestItem
Defines the 'multi_value_test' field type.

Namespace

Drupal\entity_test_update\Plugin\Field\FieldType

Code

public function isEmpty() {
  $item = $this
    ->getValue();
  return empty($item['value1']) && empty($item['value2']);
}