return new ChoiceAttr($formType,
$attr,
$vary);
} /**
* Decorates a "choice_translation_parameters" option to make it cacheable.
*
* @param callable|array $translationParameters Any pseudo callable or array to create translation parameters from a choice
* @param mixed $vary Dynamic data used to compute a unique hash when caching the option
*/
public static function translationParameters(FormTypeInterface|FormTypeExtensionInterface
$formType, callable|array
$translationParameters, mixed
$vary = null
): ChoiceTranslationParameters
{ return new ChoiceTranslationParameters($formType,
$translationParameters,
$vary);
} /**
* Decorates a "group_by" callback to make it cacheable.
*
* @param callable|array $groupBy Any pseudo callable to return a group name from a choice
* @param mixed $vary Dynamic data used to compute a unique hash when caching the callback
*/
public static function groupBy(FormTypeInterface|FormTypeExtensionInterface
$formType, callable|array
$groupBy, mixed
$vary = null
): GroupBy
{ return new GroupBy($formType,
$groupBy,
$vary);
}