class UserCancelMethodsConstraint

Hierarchy

Expanded class hierarchy of UserCancelMethodsConstraint

File

core/modules/user/src/Plugin/Validation/Constraint/UserCancelMethodsConstraint.php, line 13

Namespace

Drupal\user\Plugin\Validation\Constraint
View source
class UserCancelMethodsConstraint implements ContainerFactoryPluginInterface {
    
    /**
     * {@inheritdoc}
     */
    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);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
UserCancelMethodsConstraint::create public static function Overrides ContainerFactoryPluginInterface::create

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.