class EntityPagePreview in Real-time SEO for Drupal 8.2
A class to encapsulate entity analysis results.
Hierarchy
- class \Drupal\yoast_seo\Entity\EntityPagePreview implements EntityPreviewInterface
Expanded class hierarchy of EntityPagePreview
File
- src/
Entity/ EntityPagePreview.php, line 10
Namespace
Drupal\yoast_seo\EntityView source
class EntityPagePreview implements EntityPreviewInterface {
/**
* The entity being previewed.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $entity;
/**
* The language the preview is in.
*
* @var \Drupal\Core\Language\LanguageInterface
*/
protected $language;
/**
* {@inheritdoc}
*/
public function __construct(EntityInterface $entity) {
$this->entity = $entity;
$this->language = $entity
->language();
}
/**
* {@inheritdoc}
*/
public function language() {
return $this->language;
}
/**
* {@inheritdoc}
*/
public function getEntity() {
return $this->entity;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityPagePreview:: |
protected | property | The entity being previewed. | |
EntityPagePreview:: |
protected | property | The language the preview is in. | |
EntityPagePreview:: |
public | function |
Gets the entity that this is a preview for. Overrides EntityPreviewInterface:: |
|
EntityPagePreview:: |
public | function |
Retrieves the language of the preview. Overrides EntityPreviewInterface:: |
|
EntityPagePreview:: |
public | function |