DragonByte Tech
Well-known member
- Affected version
- 2.1.3
In
And yet, if you choose not to use this feature, both the
It seems silly to have to either define a single display group (making it not really an option), or having to copy those two functions just to get rid of the
If you don't want to make any changes to the repository, please consider adding a fallback to
\XF\Entity\AbstractField
:: setupDefaultStructure
there is support for no display_groups
:
PHP:
if ($options['groups'])
{
$firstOption = reset($options['groups']);
$structure->columns['display_group'] = ['type' => self::STR, 'default' => $firstOption,
'allowedValues' => $options['groups'],
'api' => true
];
}
findFieldsForList
and getFieldCacheData
functions in \XF\Repository\AbstractField
will fail.It seems silly to have to either define a single display group (making it not really an option), or having to copy those two functions just to get rid of the
display_group
sort.If you don't want to make any changes to the repository, please consider adding a fallback to
setupDefaultStructure
perhaps like so:
PHP:
if ($options['groups'])
{
$firstOption = reset($options['groups']);
$structure->columns['display_group'] = ['type' => self::STR, 'default' => $firstOption,
'allowedValues' => $options['groups'],
'api' => true
];
}
else
{
$structure->columns['display_group'] = ['type' => self::STR, 'default' => 'default',
'allowedValues' => ['default'],
'api' => true
];
}