Mercurial > hg > isophonics-drupal-site
comparison core/modules/layout_builder/src/Controller/AddSectionController.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\layout_builder\Controller; | 3 namespace Drupal\layout_builder\Controller; |
4 | 4 |
5 use Drupal\Core\Ajax\AjaxHelperTrait; | 5 use Drupal\Core\Ajax\AjaxHelperTrait; |
6 use Drupal\Core\DependencyInjection\ClassResolverInterface; | |
7 use Drupal\Core\DependencyInjection\ContainerInjectionInterface; | 6 use Drupal\Core\DependencyInjection\ContainerInjectionInterface; |
8 use Drupal\layout_builder\LayoutTempstoreRepositoryInterface; | 7 use Drupal\layout_builder\LayoutTempstoreRepositoryInterface; |
9 use Drupal\layout_builder\Section; | 8 use Drupal\layout_builder\Section; |
10 use Drupal\layout_builder\SectionStorageInterface; | 9 use Drupal\layout_builder\SectionStorageInterface; |
11 use Symfony\Component\DependencyInjection\ContainerInterface; | 10 use Symfony\Component\DependencyInjection\ContainerInterface; |
13 | 12 |
14 /** | 13 /** |
15 * Defines a controller to add a new section. | 14 * Defines a controller to add a new section. |
16 * | 15 * |
17 * @internal | 16 * @internal |
17 * Controller classes are internal. | |
18 */ | 18 */ |
19 class AddSectionController implements ContainerInjectionInterface { | 19 class AddSectionController implements ContainerInjectionInterface { |
20 | 20 |
21 use AjaxHelperTrait; | 21 use AjaxHelperTrait; |
22 use LayoutRebuildTrait; | 22 use LayoutRebuildTrait; |
31 /** | 31 /** |
32 * AddSectionController constructor. | 32 * AddSectionController constructor. |
33 * | 33 * |
34 * @param \Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository | 34 * @param \Drupal\layout_builder\LayoutTempstoreRepositoryInterface $layout_tempstore_repository |
35 * The layout tempstore repository. | 35 * The layout tempstore repository. |
36 * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver | |
37 * The class resolver. | |
38 */ | 36 */ |
39 public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository, ClassResolverInterface $class_resolver) { | 37 public function __construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository) { |
40 $this->layoutTempstoreRepository = $layout_tempstore_repository; | 38 $this->layoutTempstoreRepository = $layout_tempstore_repository; |
41 $this->classResolver = $class_resolver; | |
42 } | 39 } |
43 | 40 |
44 /** | 41 /** |
45 * {@inheritdoc} | 42 * {@inheritdoc} |
46 */ | 43 */ |
47 public static function create(ContainerInterface $container) { | 44 public static function create(ContainerInterface $container) { |
48 return new static( | 45 return new static( |
49 $container->get('layout_builder.tempstore_repository'), | 46 $container->get('layout_builder.tempstore_repository') |
50 $container->get('class_resolver') | |
51 ); | 47 ); |
52 } | 48 } |
53 | 49 |
54 /** | 50 /** |
55 * Adds the new section. | 51 * Adds the new section. |