You are here

interface EntityPreviewInterface in Real-time SEO for Drupal 8.2

Defines a common interface for entity preview objects.

Entity preview objects provide info about the rendered state of an entity.

@package Drupal\yoast_seo\Entity

Hierarchy

Expanded class hierarchy of EntityPreviewInterface

All classes that implement EntityPreviewInterface

File

src/Entity/EntityPreviewInterface.php, line 12

Namespace

Drupal\yoast_seo\Entity
View source
interface EntityPreviewInterface {

  /**
   * Retrieves the language of the preview.
   *
   * @return \Drupal\Core\Language\LanguageInterface
   *   The language object.
   */
  public function language();

  /**
   * Gets the entity that this is a preview for.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The entity object.
   */
  public function getEntity();

}

Members

Namesort descending Modifiers Type Description Overrides
EntityPreviewInterface::getEntity public function Gets the entity that this is a preview for. 1
EntityPreviewInterface::language public function Retrieves the language of the preview. 1