Mercurial > hg > isophonics-drupal-site
comparison core/modules/layout_builder/src/Access/LayoutSectionAccessCheck.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
10 | 10 |
11 /** | 11 /** |
12 * Provides an access check for the Layout Builder UI. | 12 * Provides an access check for the Layout Builder UI. |
13 * | 13 * |
14 * @internal | 14 * @internal |
15 * Tagged services are internal. | |
16 * | |
17 * @todo Deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use | |
18 * \Drupal\layout_builder\Access\LayoutBuilderAccessCheck instead. See | |
19 * https://www.drupal.org/node/3039551. | |
15 */ | 20 */ |
16 class LayoutSectionAccessCheck implements AccessInterface { | 21 class LayoutSectionAccessCheck implements AccessInterface { |
17 | 22 |
18 /** | 23 /** |
19 * Checks routing access to the layout. | 24 * Checks routing access to the layout. |
25 * | 30 * |
26 * @return \Drupal\Core\Access\AccessResultInterface | 31 * @return \Drupal\Core\Access\AccessResultInterface |
27 * The access result. | 32 * The access result. |
28 */ | 33 */ |
29 public function access(RouteMatchInterface $route_match, AccountInterface $account) { | 34 public function access(RouteMatchInterface $route_match, AccountInterface $account) { |
35 @trigger_error(__NAMESPACE__ . '\LayoutSectionAccessCheck is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\layout_builder\Access\LayoutBuilderAccessCheck instead. See https://www.drupal.org/node/3039551.', E_USER_DEPRECATED); | |
30 $section_storage = $route_match->getParameter('section_storage'); | 36 $section_storage = $route_match->getParameter('section_storage'); |
31 | 37 |
32 if (empty($section_storage)) { | 38 if (empty($section_storage)) { |
33 return AccessResult::forbidden()->addCacheContexts(['route']); | 39 return AccessResult::forbidden()->addCacheContexts(['route']); |
34 } | 40 } |