private function isActiveRecordUnique($attributes) {
        /* @var $class \yii\db\ActiveRecord */
        $class = $this->className;
        return empty($attributes) ? true :
                !$class::find()->where($attributes)->exists();
    }
private function isActiveRecordUnique($attributes) {
        /* @var $class \yii\db\ActiveRecord */
        $class = $this->className;
        return empty($attributes) ? true :
                !$class::find()->where($attributes)->exists();
    }
private function isActiveRecordUnique ( $ attributes ) { /* @var $class \yii\db\ActiveRecord */ $ class = $ this -> className ; return empty ( $ attributes ) ? true : ! $ class :: find ( ) -> where ( $ attributes ) -> exists ( ) ; }
Will check if Active Record is unique by exists query.
@param array $attributes
@return boolean
Will check if Active Record is unique by exists query .