Jarves\Configuration\Theme::getLayoutByKey PHP Method

getLayoutByKey() public method

public getLayoutByKey ( string $key ) : ThemeLayout | null
$key string
return ThemeLayout | null
    public function getLayoutByKey($key)
    {
        if (!$this->layouts) {
            throw new \LogicException(sprintf('The theme %s does not contain any layouts', $this->getId()));
        }
        foreach ($this->layouts as $layout) {
            if (strtolower($layout->getKey()) === strtolower($key)) {
                return $layout;
            }
        }
        return null;
    }