1
0

BxBaseIconset.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. /**
  10. * Basic iconset representation.
  11. * @see BxDolIconset
  12. */
  13. class BxBaseIconset extends BxDolIconset
  14. {
  15. protected $_oTemplate;
  16. public function __construct ($aObject, $oTemplate)
  17. {
  18. parent::__construct ($aObject);
  19. if ($oTemplate)
  20. $this->_oTemplate = $oTemplate;
  21. else
  22. $this->_oTemplate = BxDolTemplate::getInstance();
  23. }
  24. public function getPreloaderCss()
  25. {
  26. return false;
  27. }
  28. public function getPreloaderJs()
  29. {
  30. return false;
  31. }
  32. public function getIcon($sIcon)
  33. {
  34. return $sIcon;
  35. }
  36. /**
  37. * Get icon as ready to use HTML code (e.g. inline SVG) which doesn't depend on the iconset's CSS/JS being loaded on the page.
  38. * @param $sIcon - icon name
  39. * @param $aAttrs - additional HTML attributes, e.g. `class`
  40. * @return string|false - HTML code or false if the iconset doesn't support it and a font icon (`<i class="sys-icon ...">`) should be used instead.
  41. */
  42. public function getIconHtml($sIcon, $aAttrs = [])
  43. {
  44. return false;
  45. }
  46. public function getCode()
  47. {
  48. return false;
  49. }
  50. }
  51. /** @} */