public function ShapeItem::isEmpty in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/ShapeItem.php \Drupal\entity_test\Plugin\Field\FieldType\ShapeItem::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/ src/ Plugin/ Field/ FieldType/ ShapeItem.php, line 80 - Contains \Drupal\entity_test\Plugin\Field\FieldType\ShapeItem.
Class
- ShapeItem
- Defines the 'shape' field type.
Namespace
Drupal\entity_test\Plugin\Field\FieldTypeCode
public function isEmpty() {
$item = $this
->getValue();
return empty($item['shape']) && empty($item['color']);
}