You are here

public function RangeItemBase::isEmpty in Range 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/RangeItemBase.php, line 148

Class

RangeItemBase
Base class for 'range' configurable field types.

Namespace

Drupal\range\Plugin\Field\FieldType

Code

public function isEmpty() {
  if (empty($this->from) && (string) $this->from !== '0' && empty($this->to) && (string) $this->to !== '0') {
    return TRUE;
  }
  return FALSE;
}