Check for airline being active; fix tests for L7 #718

This commit is contained in:
Nabeel Shahzad
2020-05-23 11:43:29 -04:00
parent 71c09aaeb1
commit c46fc9171c
36 changed files with 954 additions and 627 deletions

View File

@@ -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[''] = '';