Airship\Engine\Lens::loadMotifConfig PHP Method

loadMotifConfig() public method

Load the config for this motif
public loadMotifConfig ( string $name ) : self
$name string
return self
    public function loadMotifConfig(string $name) : self
    {
        $state = State::instance();
        if (isset($state->motifs[$name])) {
            try {
                if (\file_exists(ROOT . '/config/motifs/' . $name . '.json')) {
                    $state->motif_config = \Airship\loadJSON(ROOT . '/config/motifs/' . $name . '.json');
                } else {
                    $state->motif_config = [];
                }
            } catch (\Throwable $ex) {
                $state->motif_config = [];
            }
        }
        return $this;
    }