Skip to content
Snippets Groups Projects

Issue #3447051 by bircher: Use ModuleHandlerInterface instead of ModuleHandler

1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -4,7 +4,7 @@ namespace Drupal\typed_link\Plugin\Field\FieldWidget;
use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemInterface;
use Drupal\Core\Field\FieldItemListInterface;
@@ -43,7 +43,7 @@ class TypedLinkWidget extends LinkWidget {
/**
* The module handler.
*
* @var \Drupal\Core\Extension\ModuleHandler
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
@@ -62,10 +62,10 @@ class TypedLinkWidget extends LinkWidget {
* The widget third party settings.
* @param \Drupal\Core\Session\AccountProxyInterface $currentUser
* The current user.
* @param \Drupal\Core\Extension\ModuleHandler $moduleHandler
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* The module handler.
*/
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, AccountProxyInterface $currentUser, ModuleHandler $moduleHandler) {
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, AccountProxyInterface $currentUser, ModuleHandlerInterface $moduleHandler) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->currentUser = $currentUser;
$this->moduleHandler = $moduleHandler;
Loading