public function setTaxonomies($contentKey, $className)
    {
        if (!isset($this->contenttypes[$contentKey]['taxonomy'])) {
            return;
        }

        foreach ($this->contenttypes[$contentKey]['taxonomy'] as $taxonomytype) {
            $taxonomyConfig = $this->taxonomies[$taxonomytype];

            if (isset($taxonomyConfig['alias'])) {
                $taxonomy = $taxonomyConfig['alias'];
            } else {
                $taxonomy = $taxonomytype;
            }

            $mapping = [
                'fieldname' => $taxonomy,
                'type'      => 'null',
                'fieldtype' => $this->typemap['taxonomy'],
                'target'    => $this->schemaManager->getTableName('taxonomy'),
            ];

            $this->metadata[$className]['fields'][$taxonomy] = $mapping;
            $this->metadata[$className]['fields'][$taxonomy]['data'] = $taxonomyConfig;
        }
    }
public function setTaxonomies($contentKey, $className)
    {
        if (!isset($this->contenttypes[$contentKey]['taxonomy'])) {
            return;
        }

        foreach ($this->contenttypes[$contentKey]['taxonomy'] as $taxonomytype) {
            $taxonomyConfig = $this->taxonomies[$taxonomytype];

            if (isset($taxonomyConfig['alias'])) {
                $taxonomy = $taxonomyConfig['alias'];
            } else {
                $taxonomy = $taxonomytype;
            }

            $mapping = [
                'fieldname' => $taxonomy,
                'type'      => 'null',
                'fieldtype' => $this->typemap['taxonomy'],
                'target'    => $this->schemaManager->getTableName('taxonomy'),
            ];

            $this->metadata[$className]['fields'][$taxonomy] = $mapping;
            $this->metadata[$className]['fields'][$taxonomy]['data'] = $taxonomyConfig;
        }
    }
public function setTaxonomies ( $ contentKey , $ className ) { if ( ! isset ( $ this -> contenttypes [ $ contentKey ] [ 'taxonomy' ] ) ) { return ; } foreach ( $ this -> contenttypes [ $ contentKey ] [ 'taxonomy' ] as $ taxonomytype ) { $ taxonomyConfig = $ this -> taxonomies [ $ taxonomytype ] ; if ( isset ( $ taxonomyConfig [ 'alias' ] ) ) { $ taxonomy = $ taxonomyConfig [ 'alias' ] ; } else { $ taxonomy = $ taxonomytype ; } $ mapping = [ 'fieldname' => $ taxonomy , 'type' => 'null' , 'fieldtype' => $ this -> typemap [ 'taxonomy' ] , 'target' => $ this -> schemaManager -> getTableName ( 'taxonomy' ) , ] ; $ this -> metadata [ $ className ] [ 'fields' ] [ $ taxonomy ] = $ mapping ; $ this -> metadata [ $ className ] [ 'fields' ] [ $ taxonomy ] [ 'data' ] = $ taxonomyConfig ; } }
Set the taxonomy.

@param string $contentKey
@param string $className
Set the taxonomy .