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 | * @param string $type |
||
30 | * The entity type of the given entity ids. |
||
31 | * @param array|int $id |
||
32 | * The entity id(s) to load. |
||
33 | * |
||
34 | * @return \Closure |
||
35 | * The callback to invoke to load the result for this buffer item. |
||
36 | */ |
||
37 | public function add($type, $id) { |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | protected function getBufferId($item) { |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function resolveBufferArray(array $buffer) { |
||
78 | |||
79 | } |