Mercurial > hg > isophonics-drupal-site
diff core/modules/layout_builder/src/InlineBlockUsage.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/InlineBlockUsage.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/layout_builder/src/InlineBlockUsage.php Thu May 09 15:33:08 2019 +0100 @@ -7,10 +7,8 @@ /** * Service class to track inline block usage. - * - * @internal */ -class InlineBlockUsage { +class InlineBlockUsage implements InlineBlockUsageInterface { /** * The database connection. @@ -30,12 +28,7 @@ } /** - * Adds a usage record. - * - * @param int $block_content_id - * The block content id. - * @param \Drupal\Core\Entity\EntityInterface $entity - * The layout entity. + * {@inheritdoc} */ public function addUsage($block_content_id, EntityInterface $entity) { $this->database->merge('inline_block_usage') @@ -47,13 +40,7 @@ } /** - * Gets unused inline block IDs. - * - * @param int $limit - * The maximum number of block content entity IDs to return. - * - * @return int[] - * The entity IDs. + * {@inheritdoc} */ public function getUnused($limit = 100) { $query = $this->database->select('inline_block_usage', 't'); @@ -64,10 +51,7 @@ } /** - * Remove usage record by layout entity. - * - * @param \Drupal\Core\Entity\EntityInterface $entity - * The layout entity. + * {@inheritdoc} */ public function removeByLayoutEntity(EntityInterface $entity) { $query = $this->database->update('inline_block_usage') @@ -81,10 +65,7 @@ } /** - * Delete the inline blocks' the usage records. - * - * @param int[] $block_content_ids - * The block content entity IDs. + * {@inheritdoc} */ public function deleteUsage(array $block_content_ids) { if (!empty($block_content_ids)) { @@ -94,13 +75,7 @@ } /** - * Gets usage record for inline block by ID. - * - * @param int $block_content_id - * The block content entity ID. - * - * @return object - * The usage record with properties layout_entity_id and layout_entity_type. + * {@inheritdoc} */ public function getUsage($block_content_id) { $query = $this->database->select('inline_block_usage');