You are here

public function TwitterWidgetItem::isEmpty in Twitter Profile Widget 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/TwitterWidgetItem.php \Drupal\twitter_profile_widget\Plugin\Field\FieldType\TwitterWidgetItem::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/TwitterWidgetItem.php, line 132

Class

TwitterWidgetItem
Plugin implementation of the 'twitter_widget' field type.

Namespace

Drupal\twitter_profile_widget\Plugin\Field\FieldType

Code

public function isEmpty() {
  $account = $this
    ->get('account')
    ->getValue();
  $search = $this
    ->get('search')
    ->getValue();
  $timeline = $this
    ->get('timeline')
    ->getValue();
  return empty($account) && empty($search) && empty($timeline);
}