BxBaseSearchExtendedForm.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. * Extended Search Form.
  11. *
  12. * @see BxDolSearchExtended
  13. */
  14. class BxBaseSearchExtendedForm extends BxTemplFormView
  15. {
  16. public function __construct($aInfo, $oTemplate = false)
  17. {
  18. parent::__construct($aInfo, $oTemplate);
  19. }
  20. function getCleanValue ($sName)
  21. {
  22. if(isset($this->aInputs[$sName]['type']) && $this->aInputs[$sName]['type'] == 'location')
  23. return BxDolMetatags::locationsRetrieveFromForm($sName, $this);
  24. return parent::getCleanValue($sName);
  25. }
  26. public function genInputLocation(&$aInput)
  27. {
  28. $aInput['manual_input'] = true;
  29. return parent::genInputLocation($aInput);
  30. }
  31. protected function genCustomInputAuthor($aInput)
  32. {
  33. $aInput['ajax_get_suggestions'] = BX_DOL_URL_ROOT . 'searchExtended.php?action=get_authors';
  34. return $this->genCustomInputUsernamesSuggestions($aInput);
  35. }
  36. }
  37. /** @} */