Airship\Cabin\Bridge\Landing\Motifs::updateMotifs PHP Method

updateMotifs() protected method

protected updateMotifs ( array $motifs, array $post, string $cabin ) : boolean
$motifs array
$post array
$cabin string
return boolean
    protected function updateMotifs(array $motifs, array $post, string $cabin) : bool
    {
        foreach ($motifs as $i => $motif) {
            $motifs[$i]['enabled'] = !empty($post['motifs_enabled']);
        }
        return \Airship\saveJSON(ROOT . '/Cabin/' . $cabin . '/config/motifs.json', $motifs);
    }