Mercurial > hg > isophonics-drupal-site
comparison core/modules/user/src/Plugin/Action/CancelUser.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
| author | Chris Cannam |
|---|---|
| date | Mon, 23 Apr 2018 09:46:53 +0100 |
| parents | 7a779792577d |
| children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
| 13:5fb285c0d0e3 | 14:1fec387a4317 |
|---|---|
| 3 namespace Drupal\user\Plugin\Action; | 3 namespace Drupal\user\Plugin\Action; |
| 4 | 4 |
| 5 use Drupal\Core\Action\ActionBase; | 5 use Drupal\Core\Action\ActionBase; |
| 6 use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | 6 use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
| 7 use Drupal\Core\Session\AccountInterface; | 7 use Drupal\Core\Session\AccountInterface; |
| 8 use Drupal\user\PrivateTempStoreFactory; | 8 use Drupal\Core\TempStore\PrivateTempStoreFactory; |
| 9 use Symfony\Component\DependencyInjection\ContainerInterface; | 9 use Symfony\Component\DependencyInjection\ContainerInterface; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Cancels a user account. | 12 * Cancels a user account. |
| 13 * | 13 * |
| 21 class CancelUser extends ActionBase implements ContainerFactoryPluginInterface { | 21 class CancelUser extends ActionBase implements ContainerFactoryPluginInterface { |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * The tempstore factory. | 24 * The tempstore factory. |
| 25 * | 25 * |
| 26 * @var \Drupal\user\PrivateTempStoreFactory | 26 * @var \Drupal\Core\TempStore\PrivateTempStoreFactory |
| 27 */ | 27 */ |
| 28 protected $tempStoreFactory; | 28 protected $tempStoreFactory; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * The current user. | 31 * The current user. |
| 41 * A configuration array containing information about the plugin instance. | 41 * A configuration array containing information about the plugin instance. |
| 42 * @param string $plugin_id | 42 * @param string $plugin_id |
| 43 * The plugin ID for the plugin instance. | 43 * The plugin ID for the plugin instance. |
| 44 * @param mixed $plugin_definition | 44 * @param mixed $plugin_definition |
| 45 * The plugin implementation definition. | 45 * The plugin implementation definition. |
| 46 * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory | 46 * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory |
| 47 * The tempstore factory. | 47 * The tempstore factory. |
| 48 * @param \Drupal\Core\Session\AccountInterface $current_user | 48 * @param \Drupal\Core\Session\AccountInterface $current_user |
| 49 * Current user. | 49 * Current user. |
| 50 */ | 50 */ |
| 51 public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { | 51 public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { |
| 61 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { | 61 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
| 62 return new static( | 62 return new static( |
| 63 $configuration, | 63 $configuration, |
| 64 $plugin_id, | 64 $plugin_id, |
| 65 $plugin_definition, | 65 $plugin_definition, |
| 66 $container->get('user.private_tempstore'), | 66 $container->get('tempstore.private'), |
| 67 $container->get('current_user') | 67 $container->get('current_user') |
| 68 ); | 68 ); |
| 69 } | 69 } |
| 70 | 70 |
| 71 /** | 71 /** |
