You are here

public function BlockFieldItem::isEmpty in Block field 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/BlockFieldItem.php, line 137

Class

BlockFieldItem
Plugin implementation of the 'block_field' field type.

Namespace

Drupal\block_field\Plugin\Field\FieldType

Code

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