Commit a65fbf6d authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Nouvelle fonction de découpage pour les témoins

parent cc227a08
Loading
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -102,6 +102,18 @@ class Parametre
    }


    public function getTemoins() : array
    {
        $on = [];
        $off = [];
        $listing = explode(";", $this->getValeur());
        foreach ($listing as $item) {
            if (isset($item[0])) {
                if ($item[0] === '!') $off[] = substr($item, 1); else $on[] = $item;
            }
        }
        return [ 'on' => $on, 'off' => $off];
    }


}