Commit 7712aad1 authored by mrweiner's avatar mrweiner

Do not keep track of slots on drawer

parent fb0a1f97
services:
cache_register.manager:
class: Drupal\cache_register\Manager
arguments: [ '@cache.data' ]
arguments: [ '@cache', '@cache.data' ]
#
# Not really sure if there's a benefit to doing this,
......
......@@ -20,13 +20,6 @@ class Drawer implements DrawerInterface {
*/
protected $id;
/**
* Array of slots in the drawer.
*
* @var Slot[]
*/
protected $slots = [];
/**
* The constructor.
*
......@@ -48,9 +41,7 @@ class Drawer implements DrawerInterface {
* {@inheritDoc}
*/
public function createSlot($slot_ids) {
$slot = new Slot($this->cache, $this, $slot_ids);
$this->slots[] = $slot;
return $slot;
return new Slot($this->cache, $this, $slot_ids);
}
/**
......@@ -60,22 +51,6 @@ class Drawer implements DrawerInterface {
return $this->id;
}
/**
* {@inheritDoc}
*/
public function getSlots() {
return $this->slots;
}
/**
* {@inheritDoc}
*/
public function deleteAll() {
foreach ($this->slots as $slot) {
$slot->deleteCache();
}
}
/**
* {@inheritDoc}
*/
......
......@@ -29,19 +29,7 @@ interface DrawerInterface {
public function id();
/**
* @return \Drupal\cache_register\SlotInterface[]
*/
public function getSlots();
/**
* Invalidate (delete) all child slot cache entries.
*
* @return mixed
*/
public function deleteAll();
/**
* Invalidate (delete) all child slot cache entries.
* Invalidate all slots in the drawer.
*
* @return mixed
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment