Bolt\Legacy\Storage::getContentTypeTaxonomy PHP Method

getContentTypeTaxonomy() public method

Get an array of the available taxonomytypes for a given contenttype.
public getContentTypeTaxonomy ( string $contenttypeslug ) : array
$contenttypeslug string
return array $taxonomy
    public function getContentTypeTaxonomy($contenttypeslug)
    {
        $contenttype = $this->getContentType($contenttypeslug);
        if (empty($contenttype['taxonomy'])) {
            return [];
        } else {
            $taxokeys = $contenttype['taxonomy'];
            $taxonomy = [];
            foreach ($taxokeys as $key) {
                if ($this->app['config']->get('taxonomy/' . $key)) {
                    $taxonomy[$key] = $this->app['config']->get('taxonomy/' . $key);
                }
            }
            return $taxonomy;
        }
    }