Airship\Cabin\Bridge\Blueprint\Skyport::deleteMotifFromCabin PHP Method

deleteMotifFromCabin() protected method

Deletes a motif from a cabin's configuration
protected deleteMotifFromCabin ( string $cabin, string $key )
$cabin string
$key string
    protected function deleteMotifFromCabin(string $cabin, string $key)
    {
        $filename = ROOT . '/Cabin/' . $cabin . '/config/motifs.json';
        $motifs = \Airship\loadJSON($filename);
        if (isset($motifs[$key])) {
            unset($motifs[$key]);
            \Airship\saveJSON($filename, $motifs);
        }
    }