Check for airline being active; fix tests for L7 #718
This commit is contained in:
@@ -27,14 +27,19 @@ class AirlineRepository extends Repository implements CacheableInterface
|
||||
/**
|
||||
* Return the list of airline formatted for a select box
|
||||
*
|
||||
* @param mixed $add_blank
|
||||
* @param bool $add_blank
|
||||
* @param bool $only_active
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function selectBoxList($add_blank = false): array
|
||||
public function selectBoxList($add_blank = false, $only_active = true): array
|
||||
{
|
||||
$retval = [];
|
||||
$items = $this->all();
|
||||
$where = [
|
||||
'active' => $only_active,
|
||||
];
|
||||
|
||||
$items = $this->findWhere($where);
|
||||
|
||||
if ($add_blank) {
|
||||
$retval[''] = '';
|
||||
|
||||
Reference in New Issue
Block a user