ExtraFieldDisplayBase.php in Extra Field 8.2
File
src/Plugin/ExtraFieldDisplayBase.php
View source
<?php
namespace Drupal\extra_field\Plugin;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
abstract class ExtraFieldDisplayBase extends PluginBase implements ExtraFieldDisplayInterface {
protected $entity;
protected $viewMode;
protected $entityViewDisplay;
public function setEntity(ContentEntityInterface $entity) {
$this->entity = $entity;
}
public function getEntity() {
return $this->entity;
}
public function setEntityViewDisplay(EntityViewDisplayInterface $display) {
$this->entityViewDisplay = $display;
}
public function getEntityViewDisplay() {
return $this->entityViewDisplay;
}
public function setViewMode($viewMode) {
$this->viewMode = $viewMode;
}
public function getViewMode() {
return $this->viewMode;
}
}