You are here

public function GridFieldType::isEmpty in Paragraphs grid 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/GridFieldType.php, line 164

Class

GridFieldType
Plugin implementation of the 'grid_field_type' field type.

Namespace

Drupal\paragraphs_grid\Plugin\Field\FieldType

Code

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