1 | <?php |
||
7 | class EntityBuffer extends BufferBase { |
||
8 | |||
9 | /** |
||
10 | * The entity type manager service. |
||
11 | * |
||
12 | * @var \Drupal\Core\Entity\EntityTypeManagerInterface |
||
13 | */ |
||
14 | protected $entityTypeManager; |
||
15 | |||
16 | /** |
||
17 | * EntityBuffer constructor. |
||
18 | * |
||
19 | * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager |
||
20 | * The entity type manager service. |
||
21 | */ |
||
22 | public function __construct(EntityTypeManagerInterface $entityTypeManager) { |
||
25 | |||
26 | /** |
||
27 | * Add an item to the buffer. |
||
28 | * |
||
29 | * The results are ordered in the same way as the given publications. |
||
30 | * |
||
31 | * @param string $type |
||
32 | * The entity type of the given entity ids. |
||
33 | * @param array|int $id |
||
34 | * The entity id(s) to load. |
||
35 | * |
||
36 | * @return \Closure |
||
37 | * The callback to invoke to load the result for this buffer item. |
||
38 | */ |
||
39 | public function add($type, $id) { |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | protected function getBufferId($item) { |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function resolveBufferArray(array $buffer) { |
||
80 | |||
81 | } |