function ShapeItem::isEmpty

Overrides Map::isEmpty

File

core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php, line 75

Class

ShapeItem
Defines the 'shape' field type.

Namespace

Drupal\entity_test\Plugin\Field\FieldType

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.