BxCnlFormEntry.php 910 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. * @defdroup Channels Channels
  7. * @indroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxCnlFormCheckerHelper extends BxDolFormCheckerHelper
  12. {
  13. static public function checkNameExistOrEmpty($s)
  14. {
  15. if (trim($s) == '')
  16. return false;
  17. $oModule = BxDolModule::getInstance('bx_channels');
  18. if ($oModule->_oDb->getChannelIdByName($s) !== false)
  19. return false;
  20. return true;
  21. }
  22. }
  23. /**
  24. * Create/Edit Channel Form.
  25. */
  26. class BxCnlFormEntry extends BxBaseModGroupsFormEntry
  27. {
  28. public function __construct($aInfo, $oTemplate = false)
  29. {
  30. $this->MODULE = 'bx_channels';
  31. parent::__construct($aInfo, $oTemplate);
  32. }
  33. }
  34. /** @} */