public function CpfItem::isEmpty in CPF 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/CpfItem.php \Drupal\cpf\Plugin\Field\FieldType\CpfItem::isEmpty()
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/ CpfItem.php, line 152
Class
- CpfItem
- Plugin implementation of the 'cpf' field type.
Namespace
Drupal\cpf\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
$value = $this->cpfService
->digits($value);
return empty($value);
}