vendor/uvdesk/core-framework/Dashboard/DashboardTemplate.php line 17

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\CoreFrameworkBundle\Dashboard;
  3. use Symfony\Component\Routing\RouterInterface;
  4. use Symfony\Component\HttpFoundation\RequestStack;
  5. use Symfony\Component\DependencyInjection\ContainerInterface;
  6. use Webkul\UVDesk\CoreFrameworkBundle\Framework\ExtendableComponentInterface;
  7. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\StylesheetResourceInterface;
  8. use Webkul\UVDesk\CoreFrameworkBundle\Dashboard\Segments\JavascriptResourceInterface;
  9. class DashboardTemplate implements ExtendableComponentInterface
  10. {
  11. private $scripts = [];
  12. private $stylesheets = [];
  13. public function __construct(ContainerInterface $container, RequestStack $requestStack, RouterInterface $router)
  14. {
  15. $this->router = $router;
  16. $this->container = $container;
  17. $this->requestStack = $requestStack;
  18. }
  19. public function appendJavascript($javascript, $tags = [])
  20. {
  21. $this->scripts[] = $javascript;
  22. }
  23. public function getJavascriptResources()
  24. {
  25. return $this->scripts;
  26. }
  27. public function appendStylesheet($stylesheet, $tags = [])
  28. {
  29. $this->stylesheets[] = $stylesheet;
  30. }
  31. public function getStylesheetResources()
  32. {
  33. return $this->stylesheets;
  34. }
  35. }