You are here

public function CmisField::isEmpty in CMIS API 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/CmisField.php \Drupal\cmis\Plugin\Field\FieldType\CmisField::isEmpty()
  2. 3.0.x src/Plugin/Field/FieldType/CmisField.php \Drupal\cmis\Plugin\Field\FieldType\CmisField::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/CmisField.php, line 47

Class

CmisField
Plugin implementation of the 'cmis_field' field type.

Namespace

Drupal\cmis\Plugin\Field\FieldType

Code

public function isEmpty() {
  $value1 = $this
    ->get('title')
    ->getValue();
  $value2 = $this
    ->get('path')
    ->getValue();
  return empty($value1) && empty($value2);
}