public function init() { switch (1) { case !$this->model instanceof RepliesModel && ($this->parentType == null || $this->parentId == null || $this->parentKey == null): $this->model = null; break; default: $this->model = $this->model instanceof RepliesModel ? $this->model : RepliesModel::findModel([$this->parentId, $this->parentType, $this->parentKey]); break; } parent::init(); }
public function init() { switch (1) { case !$this->model instanceof RepliesModel && ($this->parentType == null || $this->parentId == null || $this->parentKey == null): $this->model = null; break; default: $this->model = $this->model instanceof RepliesModel ? $this->model : RepliesModel::findModel([$this->parentId, $this->parentType, $this->parentKey]); break; } parent::init(); $this->uniqid = !$this->uniqid ? '-' . uniqid() : $this->uniqid; $this->options['id'] .= $this->uniqid; Asset::register($this->getView()); }