public function UrlLinkEnhancer::__construct in JSON:API Extras 8.3
Constructs UrlLinkEnhancer.
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\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger service.
Overrides PluginBase::__construct
File
- src/
Plugin/ jsonapi/ FieldEnhancer/ UrlLinkEnhancer.php, line 52
Class
- UrlLinkEnhancer
- Add URL aliases to links.
Namespace
Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancerCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, LanguageManagerInterface $language_manager, LoggerChannelFactoryInterface $logger_factory) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->languageManager = $language_manager;
$this->logger = $logger_factory
->get('jsonapi_extras');
}