function PathItem::isEmpty
Overrides Map::isEmpty
File
-
core/
modules/ path/ src/ Plugin/ Field/ FieldType/ PathItem.php, line 50
Class
- PathItem
- Defines the 'path' entity field type.
Namespace
Drupal\path\Plugin\Field\FieldTypeCode
public function isEmpty() {
$alias = $this->get('alias')
->getValue();
$pid = $this->get('pid')
->getValue();
$langcode = $this->get('langcode')
->getValue();
return ($alias === NULL || $alias === '') && ($pid === NULL || $pid === '') && ($langcode === NULL || $langcode === '');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.