public function getAttributeGroups() { if (empty($this->type)) { return []; } return $this->type->getAttributeGroups(); }