BxCoursesFormEntry.php 900 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 Courses Courses
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Create/Edit Group Form.
  13. */
  14. class BxCoursesFormEntry extends BxBaseModGroupsFormEntry
  15. {
  16. public function __construct($aInfo, $oTemplate = false)
  17. {
  18. $this->MODULE = 'bx_courses';
  19. parent::__construct($aInfo, $oTemplate);
  20. if(isset($this->aInputs['initial_members']))
  21. $this->aInputs['initial_members']['value'] = [];
  22. }
  23. public function insert ($aValsToAdd = [], $isIgnore = false)
  24. {
  25. $CNF = &$this->_oModule->_oConfig->CNF;
  26. if($this->_oModule->_oConfig->isContent())
  27. $aValsToAdd[$CNF['FIELD_STATUS']] = 'hidden';
  28. return parent::insert ($aValsToAdd, $isIgnore);
  29. }
  30. }
  31. /** @} */