Sections.php 523 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\Core\UI\Traits;
  3. /**
  4. * Form Sections Elements related functions
  5. *
  6. * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
  7. */
  8. trait Sections
  9. {
  10. protected $sections = [];
  11. public function addSection($section)
  12. {
  13. $this->sections[$section->getId()] = $section;
  14. return $this;
  15. }
  16. public function getSection($id)
  17. {
  18. return $this->sections[$id];
  19. }
  20. public function getSections()
  21. {
  22. return $this->sections;
  23. }
  24. }