Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/layout_builder/src/Controller/MoveBlockController.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\layout_builder\Controller; | 3 namespace Drupal\layout_builder\Controller; |
4 | 4 |
5 use Drupal\Core\DependencyInjection\ClassResolverInterface; | |
6 use Drupal\Core\DependencyInjection\ContainerInjectionInterface; | 5 use Drupal\Core\DependencyInjection\ContainerInjectionInterface; |
7 use Drupal\layout_builder\LayoutTempstoreRepositoryInterface; | 6 use Drupal\layout_builder\LayoutTempstoreRepositoryInterface; |
8 use Drupal\layout_builder\SectionStorageInterface; | 7 use Drupal\layout_builder\SectionStorageInterface; |
9 use Symfony\Component\DependencyInjection\ContainerInterface; | 8 use Symfony\Component\DependencyInjection\ContainerInterface; |
10 | 9 |
11 /** | 10 /** |
12 * Defines a controller to move a block. | 11 * Defines a controller to move a block. |
13 * | 12 * |
14 * @internal | 13 * @internal |
14 * Controller classes are internal. | |
15 */ | 15 */ |
16 class MoveBlockController implements ContainerInjectionInterface { | 16 class MoveBlockController implements ContainerInjectionInterface { |
17 | 17 |
18 use LayoutRebuildTrait; | 18 use LayoutRebuildTrait; |
19 | 19 |
27 /** | 27 /** |
28 * LayoutController constructor. | 28 * LayoutController constructor. |
29 * | 29 * |
30 * @param \Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository | 30 * @param \Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository |
31 * The layout tempstore repository. | 31 * The layout tempstore repository. |
32 * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver | |
33 * The class resolver. | |
34 */ | 32 */ |
35 public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, ClassResolverInterface $class_resolver) { | 33 public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository) { |
36 $this->layoutTempstoreRepository = $layout_tempstore_repository; | 34 $this->layoutTempstoreRepository = $layout_tempstore_repository; |
37 $this->classResolver = $class_resolver; | |
38 } | 35 } |
39 | 36 |
40 /** | 37 /** |
41 * {@inheritdoc} | 38 * {@inheritdoc} |
42 */ | 39 */ |
43 public static function create(ContainerInterface $container) { | 40 public static function create(ContainerInterface $container) { |
44 return new static( | 41 return new static( |
45 $container->get('layout_builder.tempstore_repository'), | 42 $container->get('layout_builder.tempstore_repository') |
46 $container->get('class_resolver') | |
47 ); | 43 ); |
48 } | 44 } |
49 | 45 |
50 /** | 46 /** |
51 * Moves a block to another region. | 47 * Moves a block to another region. |