Mercurial > hg > isophonics-drupal-site
diff core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.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 |
line wrap: on
line diff
--- a/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/layout_builder/src/EventSubscriber/SetInlineBlockDependency.php Thu May 09 15:33:08 2019 +0100 @@ -8,8 +8,9 @@ use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\layout_builder\InlineBlockUsage; +use Drupal\layout_builder\InlineBlockUsageInterface; use Drupal\layout_builder\LayoutEntityHelperTrait; +use Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** @@ -26,6 +27,7 @@ * the dependency. * * @internal + * Tagged services are internal. * * @see \Drupal\file\FileAccessControlHandler::checkAccess() * @see \Drupal\block_content\BlockContentAccessControlHandler::checkAccess() @@ -51,7 +53,7 @@ /** * The inline block usage service. * - * @var \Drupal\layout_builder\InlineBlockUsage + * @var \Drupal\layout_builder\InlineBlockUsageInterface */ protected $usage; @@ -62,13 +64,16 @@ * The entity type manager. * @param \Drupal\Core\Database\Connection $database * The database connection. - * @param \Drupal\layout_builder\InlineBlockUsage $usage + * @param \Drupal\layout_builder\InlineBlockUsageInterface $usage * The inline block usage service. + * @param \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface $section_storage_manager + * The section storage manager. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, InlineBlockUsage $usage) { + public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, InlineBlockUsageInterface $usage, SectionStorageManagerInterface $section_storage_manager) { $this->entityTypeManager = $entity_type_manager; $this->database = $database; $this->usage = $usage; + $this->sectionStorageManager = $section_storage_manager; } /** @@ -124,7 +129,6 @@ // dependency. It may be used by another module besides layout builder. return NULL; } - /** @var \Drupal\layout_builder\InlineBlockUsage $usage */ $layout_entity_storage = $this->entityTypeManager->getStorage($layout_entity_info->layout_entity_type); $layout_entity = $layout_entity_storage->load($layout_entity_info->layout_entity_id); if ($this->isLayoutCompatibleEntity($layout_entity)) {