vendor/uvdesk/core-framework/Dashboard/Dashboard.php line 19

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\CoreFrameworkBundle\Dashboard;
  3. use Webkul\UVDesk\CoreFrameworkBundle\Framework\ExtendableComponentInterface;
  4. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\NavigationInterface;
  5. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\PanelSidebarInterface;
  6. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\PanelSidebarItemInterface;
  7. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\HomepageSectionInterface;
  8. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\HomepageSectionItemInterface;
  9. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\StylesheetResourceInterface;
  10. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\JavascriptResourceInterface;
  11. class Dashboard implements ExtendableComponentInterface
  12. {
  13. public function __construct(DashboardTemplate $dashboardTemplate, NavigationTemplate $navigationTemplate, HomepageTemplate $homepageTemplate)
  14. {
  15. $this->homepageTemplate = $homepageTemplate;
  16. $this->dashboardTemplate = $dashboardTemplate;
  17. $this->navigationTemplate = $navigationTemplate;
  18. }
  19. public function appendNavigation(NavigationInterface $navigation, array $tags = [])
  20. {
  21. $this->navigationTemplate->appendNavigation($navigation, $tags);
  22. }
  23. public function getNavigationTemplate()
  24. {
  25. return $this->navigationTemplate;
  26. }
  27. public function appendHomepageSection(HomepageSectionInterface $homepageSection, array $tags = [])
  28. {
  29. $this->homepageTemplate->appendSection($homepageSection, $tags);
  30. }
  31. public function appendHomepageSectionItem(HomepageSectionItemInterface $homepageSectionItem, array $tags = [])
  32. {
  33. $this->homepageTemplate->appendSectionItem($homepageSectionItem, $tags);
  34. }
  35. public function getHomepageTemplate()
  36. {
  37. return $this->homepageTemplate;
  38. }
  39. public function appendStylesheetResource($stylesheet, array $tags = [])
  40. {
  41. $this->dashboardTemplate->appendStylesheet($stylesheet, $tags);
  42. }
  43. public function appendJavascriptResource($javascript, array $tags = [])
  44. {
  45. $this->dashboardTemplate->appendJavascript($javascript, $tags);
  46. }
  47. public function getDashboardTemplate()
  48. {
  49. return $this->dashboardTemplate;
  50. }
  51. }