Blog::get PHP Method

get() public method

public get ( $id, array $with = ['posts', 'membersCount', 'createUser'] ) : mixed
$id
$with array
return mixed
    public function get($id, array $with = ['posts', 'membersCount', 'createUser'])
    {
        return $this->with($with)->published()->findByPk((int) $id);
    }

Usage Example

 public function getCMSFields()
 {
     $fields = FieldList::create();
     $fields->push(DropdownField::create("BlogID", _t("BlogTagsWidget.Blog", "Blog"), Blog::get()->map()));
     $this->extend("updateCMSFields", $fields);
     return $fields;
 }
All Usage Examples Of Blog::get