BxTemplSearch.php 1020 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. * @defgroup UnaTemplate UNA Template Classes
  7. * @{
  8. */
  9. class BxTemplSearch extends BxBaseSearch
  10. {
  11. public function __construct ($aChoice = '', $oTemplate = false)
  12. {
  13. parent::__construct ($aChoice, $oTemplate);
  14. $this->_sSearchFunctionParams .= ", bx_site_search_complete, bx_site_search_cancel";
  15. }
  16. public function setLiveSearch($bLiveSearch)
  17. {
  18. parent::setLiveSearch($bLiveSearch);
  19. if($this->_bLiveSearch)
  20. $this->_sIdLoading = $this->_sIdForm;
  21. }
  22. public function getResultsContainer($sCode = '')
  23. {
  24. $sResult = parent::getResultsContainer($sCode);
  25. return $this->_oTemplate->parseHtmlByContent($sResult, [
  26. 'bx_if:show_hidden' => [
  27. 'condition' => empty($sCode),
  28. 'content' => []
  29. ]
  30. ]);
  31. }
  32. }
  33. /** @} */