public function wasLiked() { $model = CommentToCommentLike::model()->findByAttributes(array('commen_to_comment_id' => $this->id, 'user_id' => Yii::app()->user->id)); if (empty($model)) { return 0; } return $model->value; }