You are here

public function VoteUpDownField::isEmpty in Vote Up/Down 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/VoteUpDownField.php, line 111

Class

VoteUpDownField
Plugin implementation of the 'vote_up_down_field' field type.

Namespace

Drupal\vud\Plugin\Field\FieldType

Code

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