You are here

class LinkItDetector in Lingotek Translation 4.0.x

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

@RelatedEntitiesDetector ( id = "linkit_detector", title =

Plugin annotation


@Translation("Get editor linked entities with LinkIt module"),
  description = @translation("Get editor linked entities with LinkIt module"),
  weight = 7,
)

Hierarchy

Expanded class hierarchy of LinkItDetector

1 file declares its use of LinkItDetector
LinkItDetectorTest.php in tests/src/Unit/Plugin/RelatedEntitiesDetector/LinkItDetectorTest.php

File

src/Plugin/RelatedEntitiesDetector/LinkItDetector.php, line 13

Namespace

Drupal\lingotek\Plugin\RelatedEntitiesDetector
View source
class LinkItDetector extends EditorDetectorBase {

  /**
   * {@inheritdoc}
   */
  protected $fieldTypes = [
    "text",
    "text_long",
    "text_with_summary",
  ];

  /**
   * {@inheritdoc}
   */
  protected $xpath = "//a[@data-entity-type and @data-entity-uuid]";

}

Members

Namesort descending Modifiers Type Description Overrides
EditorDetectorBase::$entityFieldManager protected property The entity field manager.
EditorDetectorBase::$entityRepository protected property The EntityRepository service.
EditorDetectorBase::$lingotekConfiguration protected property The Lingotek configuration service.
EditorDetectorBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 1
EditorDetectorBase::extract public function Extract nested and related content. Overrides RelatedEntitiesDetectorInterface::extract
EditorDetectorBase::extractEntitiesFromText protected function Extract entities referenced by a given text. 1
EditorDetectorBase::__construct public function NestedEntityReferences constructor. Overrides PluginBase::__construct 1
LinkItDetector::$fieldTypes protected property The field types this detector applies to. Overrides EditorDetectorBase::$fieldTypes
LinkItDetector::$xpath protected property The XPath to find embedded content. Overrides EditorDetectorBase::$xpath
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.