diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php index 75845a7..6b63287 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/Shortcut.php @@ -37,6 +37,9 @@ * "uuid" = "uuid", * "bundle" = "shortcut_set", * "label" = "title" + * }, + * links = { + * "edit-form" = "/admin/config/user-interface/shortcut/link/{shortcut}" * } * ) */ diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutFormController.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutFormController.php index 8904aa1..832dc7d 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutFormController.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutFormController.php @@ -8,7 +8,7 @@ namespace Drupal\shortcut; use Drupal\Core\Entity\ContentEntityFormController; -use Drupal\Core\Entity\EntityStorageControllerInterface; +use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Form\FormBuilderInterface; use Drupal\Core\Language\Language; @@ -36,37 +36,37 @@ class ShortcutFormController extends ContentEntityFormController { protected $urlGenerator; /** - * The shortcut_set storage controller. + * The entity query factory. * - * @var \Drupal\Core\Entity\EntityStorageControllerInterface + * @var \Drupal\Core\Entity\Query\QueryFactory */ - protected $storageController; + protected $entityQueryFactory; /** - * The entity query factory. + * The form builder. * - * @var \Drupal\Core\Entity\Query\QueryFactory + * @var \Drupal\Core\Form\FormBuilderInterface */ - protected $entityQueryFactory; + protected $formBuilder; /** * Constructs a new action form. * + * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager + * The entity manager. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager * The path alias manager. * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator * The URL generator. - * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller - * The action storage controller. * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query_factory * The entity query factory. * @param \Drupal\Core\Form\FormBuilderInterface $form_builder * The form builder. */ - public function __construct(AliasManagerInterface $alias_manager, UrlGeneratorInterface $url_generator, EntityStorageControllerInterface $storage_controller, QueryFactory $entity_query_factory, FormBuilderInterface $form_builder) { + public function __construct(EntityManagerInterface $entity_manager, AliasManagerInterface $alias_manager, UrlGeneratorInterface $url_generator, QueryFactory $entity_query_factory, FormBuilderInterface $form_builder) { + $this->entityManager = $entity_manager; $this->aliasManager = $alias_manager; $this->urlGenerator = $url_generator; - $this->storageController = $storage_controller; $this->entityQueryFactory = $entity_query_factory; $this->formBuilder = $form_builder; } @@ -76,9 +76,9 @@ public function __construct(AliasManagerInterface $alias_manager, UrlGeneratorIn */ public static function create(ContainerInterface $container) { return new static( + $container->get('entity.manager'), $container->get('path.alias_manager'), $container->get('url_generator'), - $container->get('entity.manager')->getStorageController('shortcut_set'), $container->get('entity.query'), $container->get('form_builder') );