BxArtificerStudioOptions.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 Artificer Artificer template
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxArtificerStudioOptions extends BxTemplStudioOptions
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. public function __construct($sType = '', $sCategory = '', $sMix = '')
  16. {
  17. parent::__construct($sType, $sCategory, $sMix);
  18. $this->_sModule = 'bx_artificer';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. }
  21. protected function field($aItem, $aItems2Mixes)
  22. {
  23. $sPrefix = $this->_oModule->_oConfig->getPrefix('option');
  24. $aField = parent::field($aItem, $aItems2Mixes);
  25. switch($aItem['name']) {
  26. case $sPrefix . 'styles_custom':
  27. $aField = array_merge($aField, [
  28. 'code' => 1
  29. ]);
  30. break;
  31. case $sPrefix . 'images_custom':
  32. $aField = array_merge($aField, [
  33. 'info' => _t('_bx_artificer_stg_cpt_option_images_custom_inf'),
  34. 'code' => 1
  35. ]);
  36. break;
  37. }
  38. return $aField;
  39. }
  40. }
  41. /** @} */