public function PhotosImageCover::__construct in Album Photos 6.0.x
Same name and namespace in other branches
- 8.5 src/Plugin/views/field/PhotosImageCover.php \Drupal\photos\Plugin\views\field\PhotosImageCover::__construct()
Constructs a EntityLabel object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Database\Connection $connection: The database connection.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
Overrides HandlerBase::__construct
File
- src/
Plugin/ views/ field/ PhotosImageCover.php, line 61
Class
- PhotosImageCover
- Field handler to display album cover in views.
Namespace
Drupal\photos\Plugin\views\fieldCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $connection, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->connection = $connection;
$this->entityTypeManager = $entity_type_manager;
if (!$entity_display_repository) {
$entity_display_repository = \Drupal::service('entity_display.repository');
}
$this->entityDisplayRepository = $entity_display_repository;
}