public function init() { parent::init(); $this->content_type = 'post'; $this->bodyClass = ContentPost::className(); $this->pageSize_index = 10; }
public function getDetail($id) { $model = Content::getBody(ContentPost::className(), [ 'a.id' => $id ])->one(); return [ 'model' => $model ]; }