Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
10 | 12 | public function init(): void |
|
11 | { |
||
12 | 12 | $this->setMethod('get'); |
|
13 | 12 | $this->setName('quickSearch'); |
|
14 | 12 | $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); |
|
15 | 12 | $view = $viewRenderer->view; |
|
16 | |||
17 | 12 | $this->setAction($view->serverUrl() . $view->url(['controller' => 'movie', 'action' => 'index'], 'default', false)); |
|
18 | |||
19 | // Add the comment element |
||
20 | 12 | $this->addElement('text', 'search', [ |
|
21 | 12 | 'placeholder' => _tr('search movie…'), |
|
22 | 'decorators' => ['ViewHelper'], |
||
23 | ]); |
||
24 | |||
25 | // Add the submit button |
||
26 | 12 | $this->addElement('submit', 'searchSubmit', [ |
|
27 | 12 | 'label' => _tr('Search'), |
|
28 | 'decorators' => ['ViewHelper'], |
||
29 | ]); |
||
30 | |||
31 | 12 | $this->addDecorator('FormElements') |
|
32 | 12 | ->addDecorator('HtmlTag', ['tag' => 'span']) |
|
33 | 12 | ->addDecorator('Form'); |
|
34 | 12 | } |
|
36 |