Completed
Push — master ( 333ab3...9dcc44 )
by Laurent
02:27
created

ActionsFlightLog::addSearchEntry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 1
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 */
5
6
/**
7
 * ActionsFlightLog class
8
 *
9
 * @author Laurent De Coninck <[email protected]>
10
 */
11
class ActionsFlightLog
12
{
13
14
    public $results = [];
15
16
    /**
17
     * Add entry in search list
18
     *
19
     * @param array $searchInfo
20
     *
21
     * @return int
22
     */
23
    public function addSearchEntry($searchInfo)
24
    {
25
        global $langs;
26
27
        $langs->load("mymodule@flightLog");
28
29
        $this->results["flightLog"] = [
30
            'label' => $langs->trans("Search flight"),
31
            'text'  => $langs->trans("Search flight"),
32
            'url'   => DOL_URL_ROOT . '/flightLog/list.php?mainmenu=flightLog&sall='.$searchInfo['search_boxvalue']
33
        ];
34
    }
35
}