You are here

public function Dropdown::isEmpty in Open Social 8.9

Same name and namespace in other branches
  1. 8 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  2. 8.2 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  3. 8.3 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  4. 8.4 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  5. 8.5 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  6. 8.6 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  7. 8.7 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  8. 8.8 modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  9. 10.3.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  10. 10.0.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  11. 10.1.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()
  12. 10.2.x modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php \Drupal\dropdown\Plugin\Field\FieldType\Dropdown::isEmpty()

Determines whether the data structure is empty.

Return value

bool TRUE if the data structure is empty, FALSE otherwise.

Overrides Map::isEmpty

File

modules/custom/dropdown/src/Plugin/Field/FieldType/Dropdown.php, line 127

Class

Dropdown
Plugin implementation of the 'dropdown' field type.

Namespace

Drupal\dropdown\Plugin\Field\FieldType

Code

public function isEmpty() {

  // We're empty if we have no value set,
  // or we have a value that's neither a string nor an integer.
  return !isset($this->values['value']) || !is_int($this->values['value']) && !is_string($this->values['value']);
}