You are here

public function Twitter::providedFields in Media entity Twitter 8

Gets list of fields provided by this plugin.

Return value

array Associative array with field names as keys and descriptions as values.

Overrides MediaTypeInterface::providedFields

File

src/Plugin/MediaEntity/Type/Twitter.php, line 125

Class

Twitter
Provides media type plugin for Twitter.

Namespace

Drupal\media_entity_twitter\Plugin\MediaEntity\Type

Code

public function providedFields() {
  $fields = array(
    'id' => $this
      ->t('Tweet ID'),
    'user' => $this
      ->t('Twitter user information'),
  );
  if ($this->configuration['use_twitter_api']) {
    $fields += array(
      'image' => $this
        ->t('Link to the twitter image'),
      'image_local' => $this
        ->t('Copies tweet image to the local filesystem and returns the URI.'),
      'image_local_uri' => $this
        ->t('Gets URI of the locally saved image.'),
      'content' => $this
        ->t('This tweet content'),
      'retweet_count' => $this
        ->t('Retweet count for this tweet'),
      'profile_image_url_https' => $this
        ->t('Link to profile image'),
    );
  }
  return $fields;
}