X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fentity%2Fsrc%2FPlugin%2FAction%2FDeleteAction.php;fp=web%2Fmodules%2Fcontrib%2Fentity%2Fsrc%2FPlugin%2FAction%2FDeleteAction.php;h=0000000000000000000000000000000000000000;hb=059867c3f96750652c80f39e44c442a58c2549ee;hp=c99d4c9ecdbe2cf0963df04bbc40223c63baaca0;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2;p=yaffs-website diff --git a/web/modules/contrib/entity/src/Plugin/Action/DeleteAction.php b/web/modules/contrib/entity/src/Plugin/Action/DeleteAction.php deleted file mode 100644 index c99d4c9ec..000000000 --- a/web/modules/contrib/entity/src/Plugin/Action/DeleteAction.php +++ /dev/null @@ -1,97 +0,0 @@ -currentUser = $current_user; - $this->tempStore = $temp_store_factory->get('entity_delete_multiple_confirm'); - - parent::__construct($configuration, $plugin_id, $plugin_definition); - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $container->get('tempstore.private'), - $container->get('current_user') - ); - } - - /** - * {@inheritdoc} - */ - public function executeMultiple(array $entities) { - /** @var \Drupal\Core\Entity\EntityInterface[] $entities */ - $selection = []; - foreach ($entities as $entity) { - $langcode = $entity->language()->getId(); - $selection[$entity->id()][$langcode] = $langcode; - } - $this->tempStore->set($this->currentUser->id() . ':' . $this->getPluginDefinition()['type'], $selection); - } - - /** - * {@inheritdoc} - */ - public function execute($object = NULL) { - $this->executeMultiple([$object]); - } - - /** - * {@inheritdoc} - */ - public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) { - return $object->access('delete', $account, $return_as_object); - } - -}