lib/components/taxonomy/Collector.php
public function initializeTaxonomies($model, $taxonomies)
    {
        $taxonomyClass = Yii::$app->classes['Taxonomy'];
        foreach ($taxonomies as $systemId => $name) {
            $taxonomy = $taxonomyClass::findOne(['taxonomy_type_id' => $model->id, 'system_id' => $systemId]);
            if (empty($taxonomy)) {
                $taxonomy = new $taxonomyClass();
                $taxonomy->taxonomy_type_id = $model->id;
                $taxonomy->name = $name;
                $taxonomy->system_id = $systemId;
                if (!$taxonomy->save()) {
                    return false;
                }
            }
        }

        return true;
    }
public function initializeTaxonomies($model, $taxonomies)
    {
        $taxonomyClass = Yii::$app->classes['Taxonomy'];
        foreach ($taxonomies as $systemId => $name) {
            $taxonomy = $taxonomyClass::findOne(['taxonomy_type_id' => $model->id, 'system_id' => $systemId]);
            if (empty($taxonomy)) {
                $taxonomy = new $taxonomyClass();
                $taxonomy->taxonomy_type_id = $model->id;
                $taxonomy->name = $name;
                $taxonomy->system_id = $systemId;
                if (!$taxonomy->save()) {
                    return false;
                }
            }
        }

        return true;
    }
[[@doctodo method_description:initializeTaxonomies]].

@param [[@doctodo param_type:model]]      $model      [[@doctodo param_description:model]]
@param [[@doctodo param_type:taxonomies]] $taxonomies [[@doctodo param_description:taxonomies]]

@return [[@doctodo return_type:initializeTaxonomies]] [[@doctodo return_description:initializeTaxonomies]]