class ShareMessage in Share Message 8
Entity class for the Share Message entity.
Plugin annotation
@ConfigEntityType(
  id = "sharemessage",
  label = @Translation("Share Message"),
  handlers = {
    "access" = "Drupal\sharemessage\Entity\Handler\ShareMessageAccessControlHandler",
    "view_builder" = "Drupal\sharemessage\Entity\Handler\ShareMessageViewBuilder",
    "list_builder" = "Drupal\sharemessage\Entity\Handler\ShareMessageListBuilder",
    "form" = {
      "add" = "Drupal\sharemessage\Form\ShareMessageForm",
      "edit" = "Drupal\sharemessage\Form\ShareMessageForm",
      "delete" = "Drupal\Core\Entity\EntityDeleteForm"
    }
  },
  entity_keys = {
    "id" = "id",
    "label" = "label"
  },
  config_export = {
    "id",
    "label",
    "title",
    "message_long",
    "message_short",
    "image_url",
    "image_width",
    "image_height",
    "fallback_image",
    "video_url",
    "share_url",
    "plugin",
    "enforce_usage",
    "settings",
    "extra_field_entity_type",
    "extra_field_bundles",
  },
  links = {
    "edit-form" = "/admin/config/services/sharemessage/manage/{sharemessage}",
    "delete-form" = "/admin/config/services/sharemessage/manage/{sharemessage}/delete",
    "collection" = "/admin/config/services/sharemessage",
  }
)
  Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\sharemessage\Entity\ShareMessage implements ShareMessageInterface
 
 
 - class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
 
Expanded class hierarchy of ShareMessage
1 file declares its use of ShareMessage
- sharemessage.module in ./
sharemessage.module  - New Sharing Module.
 
File
- src/
Entity/ ShareMessage.php, line 57  
Namespace
Drupal\sharemessage\EntityView source
class ShareMessage extends ConfigEntityBase implements ShareMessageInterface {
  /**
   * The machine name of this Share Message.
   *
   * @var string
   */
  public $id;
  /**
   * The label of the Share Message.
   *
   * @var string
   */
  public $label;
  /**
   * The flag for enforcing the usage of the Share Message.
   *
   * @var string
   */
  public $enforce_usage;
  /**
   * The settings of the Share Message.
   *
   * @var string
   */
  public $settings;
  /**
   * The title of the Share Message.
   *
   * @var string
   */
  public $title;
  /**
   * The long share text of the Share Message.
   *
   * @var string
   */
  public $message_long;
  /**
   * The short text of the Share Message, used for twitter.
   *
   * @var string
   */
  public $message_short;
  /**
   * The image URL that will be used for sharing.
   *
   * @var string
   */
  public $image_url;
  /**
   * The width of the image that will be used for sharing.
   *
   * @var string
   */
  public $image_width;
  /**
   * The height of the image that will be used for sharing.
   *
   * @var string
   */
  public $image_height;
  /**
   * An optional fallback image as file UUID if the image URL does not resolve.
   *
   * @var string
   */
  public $fallback_image;
  /**
   * A video URL to use for sharing.
   *
   * @var string
   */
  public $video_url;
  /**
   * Specific URL that will be shared, defaults to the current page
   *
   * @var string
   */
  public $share_url;
  /**
   * Share plugin ID.
   *
   * @var string
   */
  protected $plugin;
  /**
   * The entity type to filter its bundles to display on the UI.
   *
   * @var string
   */
  protected $extra_field_entity_type;
  /**
   * The entity types bundles where the Share Message will be displayed.
   *
   * @var string[]
   */
  protected $extra_field_bundles = [];
  /**
   * The runtime token context.
   *
   * @var array
   */
  protected $runtimeContext = [];
  /**
   * {@inheritdoc}
   */
  public function setLabel($label) {
    $this
      ->set('label', $label);
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function setTitle($title) {
    $this
      ->set('title', $title);
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function getPlugin() {
    return \Drupal::service('plugin.manager.sharemessage.share')
      ->createInstance($this->plugin, [
      'sharemessage' => $this,
    ]);
  }
  /**
   * {@inheritdoc}
   */
  public function getPluginId() {
    return $this->plugin;
  }
  /**
   * {@inheritdoc}
   */
  public function setPluginID($plugin_id) {
    $this->plugin = $plugin_id;
  }
  /**
   * {@inheritdoc}
   */
  public function hasPlugin() {
    if (!empty($this->plugin) && \Drupal::service('plugin.manager.sharemessage.share')
      ->hasDefinition($this->plugin)) {
      return TRUE;
    }
    return FALSE;
  }
  /**
   * {@inheritdoc}
   */
  public function getPluginDefinition() {
    /** @var \Drupal\sharemessage\SharePluginBase $share_plugin */
    $share_plugin = $this
      ->getPlugin();
    return $share_plugin
      ->getPluginDefinition();
  }
  /**
   * {@inheritdoc}
   */
  public function getSetting($key) {
    if (!empty($this->settings[$key])) {
      return $this->settings[$key];
    }
  }
  /**
   * {@inheritdoc}
   */
  public function setRuntimeContext(array $context) {
    $this->runtimeContext = $context;
  }
  /**
   * {@inheritdoc}
   */
  public function getContext($view_mode = 'full') {
    $context = [
      'sharemessage' => $this,
      'view_mode' => $view_mode,
    ];
    // Add a runtime context to the context list.
    $context += $this->runtimeContext;
    // Attempt to use the current node as context if none has been set
    // explicitly as runtime context.
    $node = \Drupal::request()->attributes
      ->get('node');
    if (!isset($context['node']) && $node instanceof NodeInterface) {
      $context['node'] = $node;
    }
    // Let other modules alter the sharing context that will be used for token
    // as base for replacements.
    \Drupal::moduleHandler()
      ->alter('sharemessage_token_context', $this, $context);
    return $context;
  }
  /**
   * {@inheritdoc}
   */
  public function buildOGTags($context) {
    $tags = [];
    // Base value for og:type meta tag.
    // @todo don't hardcode this, make configurable per Share Message entity.
    $type = 'website';
    // OG: Title.
    $tags[] = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'property' => 'og:title',
        'content' => $this
          ->getTokenizedField($this->title, $context),
      ],
    ];
    // OG: Image, also used for video thumbnail.
    if ($image_url = $this
      ->getImageUrl($context, $fallback_image)) {
      $tags[] = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'property' => 'og:image',
          'content' => $image_url,
        ],
      ];
      $image_width = NULL;
      $image_height = NULL;
      if ($fallback_image instanceof FileInterface) {
        if (file_exists($fallback_image
          ->getFileUri())) {
          $image = \Drupal::service('image.factory')
            ->get($fallback_image
            ->getFileUri());
          if ($image
            ->isValid()) {
            $image_width = $image
              ->getWidth();
            $image_height = $image
              ->getHeight();
          }
        }
      }
      else {
        $image_width = $this
          ->getTokenizedField($this->image_width, $context);
        $image_height = $this
          ->getTokenizedField($this->image_height, $context);
      }
      if ($image_width && $image_height) {
        $tags[] = [
          '#type' => 'html_tag',
          '#tag' => 'meta',
          '#attributes' => [
            'property' => 'og:image:width',
            'content' => $image_width,
          ],
        ];
        $tags[] = [
          '#type' => 'html_tag',
          '#tag' => 'meta',
          '#attributes' => [
            'property' => 'og:image:height',
            'content' => $image_height,
          ],
        ];
      }
    }
    // OG: Video.
    if ($video_url = $this
      ->getTokenizedField($this->video_url, $context)) {
      $tags[] = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'property' => 'og:video',
          'content' => $video_url . '?fs=1',
        ],
      ];
      $tags[] = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'property' => 'og:video:width',
          'content' => \Drupal::config('sharemessage.addthis')
            ->get('shared_video_width'),
        ],
      ];
      $tags[] = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'property' => 'og:video:height',
          'content' => \Drupal::config('sharemessage.addthis')
            ->get('shared_video_height'),
        ],
      ];
      $tags[] = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'property' => 'og:video:type',
          'content' => 'application/x-shockwave-flash',
        ],
      ];
      // Override og:type to video.
      $type = 'video';
    }
    // OG: URL.
    $tags[] = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'property' => 'og:url',
        'content' => $this
          ->getUrl($context),
      ],
    ];
    // OG: Description.
    $tags[] = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'property' => 'og:description',
        'content' => $this
          ->getTokenizedField($this->message_long, $context),
      ],
    ];
    // OG: Type.
    $tags[] = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'property' => 'og:type',
        'content' => $type,
      ],
    ];
    return $tags;
  }
  /**
   * Adds meta tags in order to share images on Twitter.
   *
   * @param array $context
   *   The context for the token replacements.
   *
   * @return array
   *   The twitter tags.
   */
  public function buildTwitterCardTags($context) {
    $twitter = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'name' => 'twitter:card',
        'content' => 'summary_large_image',
      ],
    ];
    $tags[] = [
      $twitter,
      'twitter_card',
    ];
    $twitter = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'name' => 'twitter:site',
        'content' => \Drupal::config('sharemessage.settings')
          ->get('twitter_user'),
      ],
    ];
    $tags[] = [
      $twitter,
      'twitter_site',
    ];
    $twitter = [
      '#type' => 'html_tag',
      '#tag' => 'meta',
      '#attributes' => [
        'name' => 'twitter:description',
        'content' => $this
          ->getTokenizedField($this->message_long, $context),
      ],
    ];
    $tags[] = [
      $twitter,
      'twitter_description',
    ];
    if ($image_url = $this
      ->getImageUrl($context)) {
      $twitter = [
        '#type' => 'html_tag',
        '#tag' => 'meta',
        '#attributes' => [
          'name' => 'twitter:image',
          'content' => $image_url,
        ],
      ];
      $tags[] = [
        $twitter,
        'twitter_image',
      ];
    }
    return $tags;
  }
  /**
   * {@inheritdoc}
   */
  public function getTokenizedField($property_value, $context, $default = '') {
    if ($property_value) {
      return strip_tags(PlainTextOutput::renderFromHtml(\Drupal::token()
        ->replace($property_value, $context, [
        'clear' => TRUE,
      ])));
    }
    return $default;
  }
  /**
   * {@inheritdoc}
   */
  public function getUrl($context) {
    $options = [
      'absolute' => TRUE,
    ];
    if ($this->enforce_usage) {
      $options['query'] = [
        'smid' => $this->id,
      ];
    }
    $uri = $this
      ->getTokenizedField($this->share_url, $context, Url::fromRoute('<current>')
      ->getInternalPath());
    if (strpos($uri, '://') !== FALSE) {
      return Url::fromUri($uri, $options)
        ->toString();
    }
    elseif ($url = \Drupal::pathValidator()
      ->getUrlIfValid($uri)) {
      return $url
        ->setAbsolute()
        ->toString();
    }
    else {
      return Url::fromUri('internal:/' . $uri, $options)
        ->toString();
    }
  }
  /**
   * {@inheritdoc}
   */
  public function getExtraFieldEntityType() {
    return $this->extra_field_entity_type;
  }
  /**
   * {@inheritdoc}
   */
  public function setExtraFieldEntityType($extra_field_entity_type) {
    $this->extra_field_entity_type = $extra_field_entity_type;
  }
  /**
   * {@inheritdoc}
   */
  public function getExtraFieldBundles() {
    return $this->extra_field_bundles;
  }
  /**
   * {@inheritdoc}
   */
  public function setExtraFieldBundles(array $extra_field_bundles) {
    $this->extra_field_bundles = $extra_field_bundles;
  }
  /**
   * Gets the image url of the ShareMessage.
   *
   * @param array $context
   *   The context for the token replacements.
   * @param \Drupal\file\FileInterface|null $fallback_image
   *   By-reference argument that holds the fallback image reference if that
   *   was used.
   *
   * @return bool|string
   *   The found URL or FALSE.
   */
  protected function getImageUrl($context, &$fallback_image = NULL) {
    // Get image url either from dedicated file field or by resolving token.
    $image_url = $this
      ->getTokenizedField($this->image_url, $context);
    // If the returned image URl is empty, try to use the fallback image if
    // one is defined.
    if (!$image_url && !empty($this->fallback_image)) {
      $entity_repository = \Drupal::getContainer()
        ->get('entity.repository');
      /** @var \Drupal\file\FileInterface $image */
      $fallback_image = $entity_repository
        ->loadEntityByUuid('file', $this->fallback_image);
      if ($fallback_image) {
        $image_url = file_create_url($fallback_image
          ->getFileUri());
      }
    }
    return $image_url;
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            CacheableDependencyTrait:: | 
                  protected | property | Cache contexts. | |
| 
            CacheableDependencyTrait:: | 
                  protected | property | Cache max-age. | |
| 
            CacheableDependencyTrait:: | 
                  protected | property | Cache tags. | |
| 
            CacheableDependencyTrait:: | 
                  protected | function | Sets cacheability; useful for value object constructors. | |
| 
            ConfigEntityBase:: | 
                  private | property | Whether the config is being deleted by the uninstall process. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The language code of the entity's default language. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The original ID of the configuration entity. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The enabled/disabled status of the configuration entity. | 4 | 
| 
            ConfigEntityBase:: | 
                  protected | property | Third party entity settings. | |
| 
            ConfigEntityBase:: | 
                  protected | property | Trust supplied data and not use configuration schema on save. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The UUID for this entity. | |
| 
            ConfigEntityBase:: | 
                  protected | property | Information maintained by Drupal core about configuration. | |
| 
            ConfigEntityBase:: | 
                  protected | function | Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface:: | 
                  13 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Creates a duplicate of the entity. Overrides EntityBase:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Disables the configuration entity. Overrides ConfigEntityInterface:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Enables the configuration entity. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns the value of a property. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns the cache tags that should be used to invalidate caches. Overrides EntityBase:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration dependency name. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected static | function | Gets the configuration manager. | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration target identifier for the entity. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration dependencies. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the original ID. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected | function | Gets the typed config manager. | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets whether on not the data is trusted. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected static | function | 
            Override to never invalidate the individual entities' cache tags; the
config system already invalidates them. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected | function | 
            Override to never invalidate the entity's cache tag; the config system
already invalidates it. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Checks whether this entity is installable. Overrides ConfigEntityInterface:: | 
                  2 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Overrides Entity::isNew(). Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface:: | 
                  7 | 
| 
            ConfigEntityBase:: | 
                  public static | function | 
            Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase:: | 
                  8 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Acts on an entity before the presave hook is invoked. Overrides EntityBase:: | 
                  13 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Saves an entity permanently. Overrides EntityBase:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the value of a property. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the original ID. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the status of the configuration entity. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | ||
| 
            ConfigEntityBase:: | 
                  public static | function | Helper callback for uasort() to sort configuration entities by weight and label. | 6 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface:: | 
                  4 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets an array of all property values. Overrides EntityBase:: | 
                  2 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the URL object for the entity. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets that the data should be trusted. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Unsets a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the public URL for this entity. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the URL object for the entity. Overrides EntityBase:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Constructs an Entity object. Overrides EntityBase:: | 
                  10 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Overrides EntityBase:: | 
                  4 | 
| 
            DependencySerializationTrait:: | 
                  protected | property | An array of entity type IDs keyed by the property name of their storages. | |
| 
            DependencySerializationTrait:: | 
                  protected | property | An array of service IDs keyed by property name used for serialization. | |
| 
            DependencySerializationTrait:: | 
                  public | function | Aliased as: traitSleep | 1 | 
| 
            DependencySerializationTrait:: | 
                  public | function | 2 | |
| 
            DependencyTrait:: | 
                  protected | property | The object's dependencies. | |
| 
            DependencyTrait:: | 
                  protected | function | Adds multiple dependencies. | |
| 
            DependencyTrait:: | 
                  protected | function | Adds a dependency. Aliased as: addDependencyTrait | |
| 
            EntityBase:: | 
                  protected | property | Boolean indicating whether the entity should be forced to be new. | |
| 
            EntityBase:: | 
                  protected | property | The entity type. | |
| 
            EntityBase:: | 
                  protected | property | A typed data object wrapping this entity. | |
| 
            EntityBase:: | 
                  public | function | 
            Checks data value access. Overrides AccessibleInterface:: | 
                  1 | 
| 
            EntityBase:: | 
                  public | function | 
            Gets the bundle of the entity. Overrides EntityInterface:: | 
                  1 | 
| 
            EntityBase:: | 
                  public static | function | 
            Constructs a new entity object, without permanently saving it. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Deletes an entity permanently. Overrides EntityInterface:: | 
                  2 | 
| 
            EntityBase:: | 
                  public | function | 
            Enforces an entity to be new. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  protected | function | Gets the entity manager. | |
| 
            EntityBase:: | 
                  protected | function | Gets the entity type bundle info service. | |
| 
            EntityBase:: | 
                  protected | function | Gets the entity type manager. | |
| 
            EntityBase:: | 
                  public | function | 
            The cache contexts associated with this object. Overrides CacheableDependencyTrait:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            The maximum age for which this object may be cached. Overrides CacheableDependencyTrait:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            The cache tags associated with this object. Overrides CacheableDependencyTrait:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Gets the entity type definition. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Gets the ID of the type of the entity. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  protected | function | The list cache tags to invalidate for this entity. | |
| 
            EntityBase:: | 
                  public | function | 
            Gets a typed data object for this entity object. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Indicates if a link template exists for a given key. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Gets the identifier. Overrides EntityInterface:: | 
                  11 | 
| 
            EntityBase:: | 
                  public | function | 
            Gets the label of the entity. Overrides EntityInterface:: | 
                  6 | 
| 
            EntityBase:: | 
                  public | function | 
            Gets the language of the entity. Overrides EntityInterface:: | 
                  1 | 
| 
            EntityBase:: | 
                  protected | function | Gets the language manager. | |
| 
            EntityBase:: | 
                  protected | function | Gets an array link templates. | 1 | 
| 
            EntityBase:: | 
                  public static | function | 
            Loads an entity. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public static | function | 
            Loads one or more entities. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Acts on a created entity before hooks are invoked. Overrides EntityInterface:: | 
                  4 | 
| 
            EntityBase:: | 
                  public static | function | 
            Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface:: | 
                  16 | 
| 
            EntityBase:: | 
                  public static | function | 
            Acts on loaded entities. Overrides EntityInterface:: | 
                  2 | 
| 
            EntityBase:: | 
                  public | function | 
            Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface:: | 
                  14 | 
| 
            EntityBase:: | 
                  public static | function | 
            Changes the values of an entity before it is created. Overrides EntityInterface:: | 
                  5 | 
| 
            EntityBase:: | 
                  public | function | 
            Gets a list of entities referenced by this entity. Overrides EntityInterface:: | 
                  1 | 
| 
            EntityBase:: | 
                  public | function | 
            Generates the HTML for a link to this entity. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  public | function | 
            Gets a list of URI relationships supported by this entity. Overrides EntityInterface:: | 
                  |
| 
            EntityBase:: | 
                  protected | function | Gets an array of placeholders for this entity. | 2 | 
| 
            EntityBase:: | 
                  public | function | 
            Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: | 
                  1 | 
| 
            EntityBase:: | 
                  protected | function | Gets the UUID generator. | |
| 
            PluginDependencyTrait:: | 
                  protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 | 
| 
            PluginDependencyTrait:: | 
                  protected | function | Calculates and returns dependencies of a specific plugin instance. | |
| 
            PluginDependencyTrait:: | 
                  protected | function | Wraps the module handler. | 1 | 
| 
            PluginDependencyTrait:: | 
                  protected | function | Wraps the theme handler. | 1 | 
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | 1 | |
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | ||
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | ||
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | ||
| 
            ShareMessage:: | 
                  public | property | The flag for enforcing the usage of the Share Message. | |
| 
            ShareMessage:: | 
                  protected | property | The entity types bundles where the Share Message will be displayed. | |
| 
            ShareMessage:: | 
                  protected | property | The entity type to filter its bundles to display on the UI. | |
| 
            ShareMessage:: | 
                  public | property | An optional fallback image as file UUID if the image URL does not resolve. | |
| 
            ShareMessage:: | 
                  public | property | The machine name of this Share Message. | |
| 
            ShareMessage:: | 
                  public | property | The height of the image that will be used for sharing. | |
| 
            ShareMessage:: | 
                  public | property | The image URL that will be used for sharing. | |
| 
            ShareMessage:: | 
                  public | property | The width of the image that will be used for sharing. | |
| 
            ShareMessage:: | 
                  public | property | The label of the Share Message. | |
| 
            ShareMessage:: | 
                  public | property | The long share text of the Share Message. | |
| 
            ShareMessage:: | 
                  public | property | The short text of the Share Message, used for twitter. | |
| 
            ShareMessage:: | 
                  protected | property | Share plugin ID. | |
| 
            ShareMessage:: | 
                  protected | property | The runtime token context. | |
| 
            ShareMessage:: | 
                  public | property | The settings of the Share Message. | |
| 
            ShareMessage:: | 
                  public | property | Specific URL that will be shared, defaults to the current page | |
| 
            ShareMessage:: | 
                  public | property | The title of the Share Message. | |
| 
            ShareMessage:: | 
                  public | property | A video URL to use for sharing. | |
| 
            ShareMessage:: | 
                  public | function | 
            Returns Open Graph meta tags for <head>. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Adds meta tags in order to share images on Twitter. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets a context for tokenizing. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets the enabled entity type bundles list. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets the selected entity type. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  protected | function | Gets the image url of the ShareMessage. | |
| 
            ShareMessage:: | 
                  public | function | 
            Returns the plugin instance. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets the definition of the plugin implementation. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Returns the Share Message plugin ID. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets the default settings. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Tokenizes a field, if it is set. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Gets the Share Message URL. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Checks whether the Share Message plugin of this Share Message exists. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets the enabled entity type bundles list. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets the selected entity type. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets the internal Share Message label. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets the plugin ID. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets an additional runtime context for tokenizing. Overrides ShareMessageInterface:: | 
                  |
| 
            ShareMessage:: | 
                  public | function | 
            Sets the Share Message title used when sharing. Overrides ShareMessageInterface:: | 
                  |
| 
            SynchronizableEntityTrait:: | 
                  protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
| 
            SynchronizableEntityTrait:: | 
                  public | function | ||
| 
            SynchronizableEntityTrait:: | 
                  public | function |