EntitySpecificHandlesList.php 774 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View;
  7. /**
  8. * Model which allows access to handles containing ID of the rendered entity
  9. */
  10. class EntitySpecificHandlesList
  11. {
  12. /**
  13. * The list of handles containing entity ID
  14. *
  15. * @var string[]
  16. */
  17. private $handles = [];
  18. /**
  19. * Add handle to the list of handles containing entity ID
  20. *
  21. * @param string $handle
  22. * @return void
  23. */
  24. public function addHandle($handle)
  25. {
  26. $this->handles[] = $handle;
  27. }
  28. /**
  29. * Get list of handles containing entity ID
  30. *
  31. * @return string[]
  32. */
  33. public function getHandles()
  34. {
  35. return $this->handles;
  36. }
  37. }