You are here

public function HtmlLinkDetector::__construct in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.5.x src/Plugin/RelatedEntitiesDetector/HtmlLinkDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\HtmlLinkDetector::__construct()
  2. 3.6.x src/Plugin/RelatedEntitiesDetector/HtmlLinkDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\HtmlLinkDetector::__construct()
  3. 3.7.x src/Plugin/RelatedEntitiesDetector/HtmlLinkDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\HtmlLinkDetector::__construct()
  4. 3.8.x src/Plugin/RelatedEntitiesDetector/HtmlLinkDetector.php \Drupal\lingotek\Plugin\RelatedEntitiesDetector\HtmlLinkDetector::__construct()

NestedEntityReferences constructor.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The EntityRepositoryInterface service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

\Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_configuration: The Lingotek configuration service.

\Symfony\Component\HttpFoundation\Request $request: The current request.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Path\PathValidatorInterface $path_validator: The Drupal Path Validator service.

\Drupal\Core\StreamWrapper\PublicStream $public_stream: The Public Stream service.

Overrides EditorDetectorBase::__construct

File

src/Plugin/RelatedEntitiesDetector/HtmlLinkDetector.php, line 82

Class

HtmlLinkDetector
@RelatedEntitiesDetector ( id = "html_link_detector", title = Plugin annotation @Translation("Get editor linked entities with html links"), description = @translation("Get editor linked entities with html links."), weight = 7, )

Namespace

Drupal\lingotek\Plugin\RelatedEntitiesDetector

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityRepositoryInterface $entity_repository, EntityFieldManagerInterface $entity_field_manager, LingotekConfigurationServiceInterface $lingotek_configuration, Request $request, EntityTypeManagerInterface $entity_type_manager, PathValidatorInterface $path_validator, PublicStream $public_stream) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_repository, $entity_field_manager, $lingotek_configuration);
  $this->request = $request;
  $this->entityTypeManager = $entity_type_manager;
  $this->pathValidator = $path_validator;
  $this->publicFileDirectory = $public_stream
    ->getDirectoryPath();
}