You are here

public function PathItem::isEmpty in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/path/src/Plugin/Field/FieldType/PathItem.php \Drupal\path\Plugin\Field\FieldType\PathItem::isEmpty()
  2. 10 core/modules/path/src/Plugin/Field/FieldType/PathItem.php \Drupal\path\Plugin\Field\FieldType\PathItem::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/path/src/Plugin/Field/FieldType/PathItem.php, line 49

Class

PathItem
Defines the 'path' entity field type.

Namespace

Drupal\path\Plugin\Field\FieldType

Code

public function isEmpty() {
  return ($this->alias === NULL || $this->alias === '') && ($this->pid === NULL || $this->pid === '') && ($this->langcode === NULL || $this->langcode === '');
}