/**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if (!$this->model instanceof PostModel) {
         throw new InvalidConfigException('The "model" property must be set.');
     }
     if ($this->topic instanceof TopicModels && $this->model->user instanceof UserModels) {
         if ($this->topic->first_post_user_id == $this->model->user->id) {
             $this->model->setIsTopicAuthor(true);
         }
     }
     if (!isset($this->count)) {
         $this->count = 1;
     }
     $this->registerClientScript();
 }