You are here

public function UserMentionsFieldType::isEmpty in Tweet Feed 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/Field/FieldType/UserMentionsFieldType.php \Drupal\tweet_feed\Plugin\Field\FieldType\UserMentionsFieldType::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/UserMentionsFieldType.php, line 135

Class

UserMentionsFieldType
Plugin implementation of the 'user_mentions_field_type' field type.

Namespace

Drupal\tweet_feed\Plugin\Field\FieldType

Code

public function isEmpty() {
  $mention_name = $this
    ->get('mention_name')
    ->getValue();
  $mention_screen_name = $this
    ->get('mention_screen_name')
    ->getValue();
  $mention_id = $this
    ->get('mention_id')
    ->getValue();
  return empty($mention_name) && empty($mention_screen_name) && empty($mention_id);
}