You are here

public function TwigItem::isEmpty in Twig 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/TwigItem.php, line 86

Class

TwigItem
Defines the Twig field type.

Namespace

Drupal\twig_field\Plugin\Field\FieldType

Code

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