diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDelete.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDelete.php index 1b68eab..c8c160e 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDelete.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDelete.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\ControllerInterface; -use Drupal\Core\Entity\EntityManager; +use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\taxonomy\TermInterface; use Drupal\Core\Cache\Cache; @@ -22,25 +22,25 @@ class TermDelete extends ConfirmFormBase implements ControllerInterface { /** * The term being deleted. * - * @var \Drupal\taxonomy\Plugin\Core\Entity\Term + * @var \Drupal\taxonomy\TermInterface */ protected $term; /** * Stores the Entity manager. * - * @var \Drupal\Core\Entity\EntityManager + * @var \Drupal\Core\Entity\EntityStorageControllerInterface */ - protected $entityManager; + protected $storageController; /** * Constructs a new TermDelete object. * - * @param \Drupal\Core\Entity\EntityManager $entity_manager + * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage_controller * The Entity manager. */ - public function __construct(EntityManager $entity_manager) { - $this->entityManager = $entity_manager; + public function __construct(EntityStorageControllerInterface $storage_controller) { + $this->storageController = $storage_controller; } /** @@ -48,7 +48,7 @@ public function __construct(EntityManager $entity_manager) { */ public static function create(ContainerInterface $container) { return new static( - $container->get('plugin.manager.entity') + $container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary') ); } @@ -89,6 +89,9 @@ protected function getConfirmText() { /** * {@inheritdoc} + * + * @param \Drupal\taxonomy\TermInterface $taxonomy_term + * The taxonomy term to delete. */ public function buildForm(array $form, array &$form_state, TermInterface $taxonomy_term = NULL) { $this->term = $taxonomy_term; @@ -100,7 +103,7 @@ public function buildForm(array $form, array &$form_state, TermInterface $taxono */ public function submitForm(array &$form, array &$form_state) { $this->term->delete(); - $vocabulary = $this->entityManager->getStorageController('taxonomy_vocabulary')->load(array($this->term->bundle())); + $vocabulary = $this->storageController->load(array($this->term->bundle())); // @todo Move to storage controller http://drupal.org/node/1988712 taxonomy_check_vocabulary_hierarchy(reset($vocabulary), array('tid' => $this->term->id())); drupal_set_message(t('Deleted term %name.', array('%name' => $this->term->label()))); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyDelete.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyDelete.php index 5e6fb0e..9aeb127 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyDelete.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyDelete.php @@ -19,7 +19,7 @@ class VocabularyDelete extends ConfirmFormBase { /** * The vocabulary being deleted. * - * @var \Drupal\taxonomy\Plugin\Core\Entity\Vocabulary + * @var \Drupal\taxonomy\VocabularyInterface */ protected $vocabulary; @@ -60,6 +60,9 @@ protected function getConfirmText() { /** * {@inheritdoc} + * + * @param \Drupal\taxonomy\VocabularyInterface $taxonomy_vocabulary + * The taxonomy vocabulary to delete. */ public function buildForm(array $form, array &$form_state, VocabularyInterface $taxonomy_vocabulary = NULL) { $this->vocabulary = $taxonomy_vocabulary; diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermInterface.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermInterface.php index 20169e8..f9bb432 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermInterface.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\taxonomy\Plugin\Core\Entity\TermInterface. + * Contains \Drupal\taxonomy\TermInterface. */ namespace Drupal\taxonomy; diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyInterface.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyInterface.php index 51ec34f..80c7781 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyInterface.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\taxonomy\Plugin\Core\Entity\VocabularyInterface. + * Contains \Drupal\taxonomy\VocabularyInterface. */ namespace Drupal\taxonomy;