RainLab\Pages\Classes\Menu::parseContent PHP Method

parseContent() protected method

Processes the content attribute to an array of menu data.
protected parseContent ( ) : array | null
return array | null
    protected function parseContent()
    {
        if ($this->contentDataCache !== null) {
            return $this->contentDataCache;
        }
        $parsedData = Yaml::parse($this->content);
        if (!is_array($parsedData)) {
            return null;
        }
        if (!array_key_exists('name', $parsedData)) {
            throw new SystemException(sprintf('The content of the %s file is invalid: the name element is not found.', $fileName));
        }
        return $this->contentDataCache = $parsedData;
    }