function UserCancelMethodsConstraint::create
Overrides ContainerFactoryPluginInterface::create
File
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserCancelMethodsConstraint.php, line 22
Class
Namespace
Drupal\user\Plugin\Validation\ConstraintCode
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : Choice {
$configuration['choices'] = array_keys(user_cancel_methods()['#options']);
return new Choice($configuration);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.