public function get($id, array $with = ['posts', 'membersCount', 'createUser']) { return $this->with($with)->published()->findByPk((int) $id); }
public function getCMSFields() { $fields = FieldList::create(); $fields->push(DropdownField::create("BlogID", _t("BlogTagsWidget.Blog", "Blog"), Blog::get()->map())); $this->extend("updateCMSFields", $fields); return $fields; }