1: <?php
2: /**
3: * Search page for minimal view.
4: *
5: * Copyright 2012-2014 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (GPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/gpl.
9: *
10: * @author Michael Slusarz <slusarz@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/gpl GPL
13: * @package IMP
14: */
15: class IMP_Minimal_Search extends IMP_Minimal_Base
16: {
17: /**
18: * URL Parameters:
19: * - a: (string) Action ID.
20: * - checkbox: TODO
21: * - mt: TODO
22: * - p: (integer) Page.
23: * - search: (sring) The search string
24: * - start: (integer) Start.
25: */
26: protected function _init()
27: {
28: $this->title = sprintf(_("Search %s"), $this->indicees->mailbox->display);
29:
30: $this->view->mailbox = $this->indices->mailbox->form_to;
31: $this->view->menu = $this->getMenu('search');
32: $this->view->title = $this->title;
33: $this->view->url = IMP_Minimal_Mailbox::url();
34:
35: $this->_pages[] = 'search';
36: $this->_pages[] = 'menu';
37: }
38:
39: /**
40: * @param array $opts Options:
41: * - mailbox: (string) The mailbox to search. Defaults to INBOX.
42: */
43: public static function url(array $opts = array())
44: {
45: $opts = array_merge(array('mailbox' => 'INBOX'), $opts);
46:
47: return IMP_Mailbox::get($opts['mailbox'])->url('minimal')->add('page', 'search');
48: }
49:
50: }
51: