XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
SearchShowallAction.class.php
1<?php
11
12if (!defined('XOOPS_ROOT_PATH')) {
13 exit();
14}
15
16require_once XOOPS_MODULE_PATH . '/legacy/actions/SearchResultsAction.class.php';
17require_once XOOPS_MODULE_PATH . '/legacy/forms/SearchShowallForm.class.php';
18
19
21{
22 public function _setupActionForm()
23 {
24 $this->mActionForm =new Legacy_SearchShowallForm($this->mConfig['keyword_min']);
25 $this->mActionForm->prepare();
26 }
27
28 public function _getTemplateName()
29 {
30 return 'legacy_search_showall.html';
31 }
32
33 public function _getSelectedMids()
34 {
35 $ret = [];
36 $ret[] = $this->mActionForm->get('mid');
37
38 return $ret;
39 }
40
41 public function _getMaxHit()
42 {
43 return LEGACY_SEARCH_SHOWALL_MAXHIT;
44 }
45
46 public function executeViewIndex(&$controller, &$xoopsUser, &$render)
47 {
48 parent::executeViewIndex($controller, $xoopsUser, $render);
49
50 $prevStart = $this->mActionForm->get('start') - LEGACY_SEARCH_SHOWALL_MAXHIT;
51 if ($prevStart < 0) {
52 $prevStart = 0;
53 }
54
55 $render->setAttribute('prevStart', $prevStart);
56 $render->setAttribute('nextStart', $this->mActionForm->get('start') + LEGACY_SEARCH_SHOWALL_MAXHIT);
57 }
58}