backend/controllers/TermRelationshipController.php
/**
     * Create new TermRelationship model through AJAX via Seletize box on 'create' and 'update post' page.
     */
Create new TermRelationship model through AJAX via Seletize box on 'create' and 'update post' page.
Create new TermRelationship model through AJAX via Seletize box on ' create ' and ' update post ' page .
public function actionAjaxCreateNonHierarchical()
    {
        $model = new TermRelationship();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            if ($term = $this->findTerm($model->term_id)) {
                $term->updateAttributes(['count' => ++$term->count]);
            }
        }
    }
public function actionAjaxCreateNonHierarchical ( ) { $ model = new TermRelationship ( ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { if ( $ term = $ this -> findTerm ( $ model -> term_id ) ) { $ term -> updateAttributes ( [ 'count' => ++ $ term -> count ] ) ; } } }
Create new TermRelationship model through AJAX via Seletize box on 'create' and 'update post' page.
Create new TermRelationship model through AJAX via Seletize box on ' create ' and ' update post ' page .