Type::getAttributeGroups PHP Method

getAttributeGroups() public method

public getAttributeGroups ( ) : array
return array
    public function getAttributeGroups()
    {
        $attributeGroups = [];
        foreach ($this->typeAttributes as $attribute) {
            if ($attribute->group) {
                $attributeGroups[$attribute->group->name][] = $attribute;
            } else {
                $attributeGroups[Yii::t('StoreModule.store', 'Without a group')][] = $attribute;
            }
        }
        return $attributeGroups;
    }