"Blog", ); public function getCMSFields() { $fields = FieldList::create(); $fields->push( DropdownField::create("BlogID", _t("BlogCategoriesWidget.Blog", "Blog"), Blog::get()->map()) ); $this->extend("updateCMSFields", $fields); return $fields; } public function getCategories() { $blog = $this->Blog(); if($blog) { return $blog->Categories(); } return array(); } } class BlogCategoriesWidget_Controller extends Widget_Controller { } }