You are here

public function MachineName::isEmpty in Machine name 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/MachineName.php, line 56

Class

MachineName
Plugin implementation of the 'machine_name' field type.

Namespace

Drupal\machine_name\Plugin\Field\FieldType

Code

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