Mercurial > hg > isophonics-drupal-site
comparison core/modules/layout_builder/src/InlineBlockUsageInterface.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\layout_builder; | |
4 | |
5 use Drupal\Core\Entity\EntityInterface; | |
6 | |
7 /** | |
8 * Defines an interface for tracking inline block usage. | |
9 */ | |
10 interface InlineBlockUsageInterface { | |
11 | |
12 /** | |
13 * Adds a usage record. | |
14 * | |
15 * @param int $block_content_id | |
16 * The block content ID. | |
17 * @param \Drupal\Core\Entity\EntityInterface $entity | |
18 * The layout entity. | |
19 */ | |
20 public function addUsage($block_content_id, EntityInterface $entity); | |
21 | |
22 /** | |
23 * Gets unused inline block IDs. | |
24 * | |
25 * @param int $limit | |
26 * The maximum number of block content entity IDs to return. | |
27 * | |
28 * @return int[] | |
29 * The entity IDs. | |
30 */ | |
31 public function getUnused($limit = 100); | |
32 | |
33 /** | |
34 * Remove usage record by layout entity. | |
35 * | |
36 * @param \Drupal\Core\Entity\EntityInterface $entity | |
37 * The layout entity. | |
38 */ | |
39 public function removeByLayoutEntity(EntityInterface $entity); | |
40 | |
41 /** | |
42 * Delete the inline blocks' the usage records. | |
43 * | |
44 * @param int[] $block_content_ids | |
45 * The block content entity IDs. | |
46 */ | |
47 public function deleteUsage(array $block_content_ids); | |
48 | |
49 /** | |
50 * Gets usage record for inline block by ID. | |
51 * | |
52 * @param int $block_content_id | |
53 * The block content entity ID. | |
54 * | |
55 * @return object | |
56 * The usage record with properties layout_entity_id and layout_entity_type. | |
57 */ | |
58 public function getUsage($block_content_id); | |
59 | |
60 } |