class UserViewsHooks

Hook implementations for user.

Hierarchy

Expanded class hierarchy of UserViewsHooks

File

core/modules/user/src/Hook/UserViewsHooks.php, line 11

Namespace

Drupal\user\Hook
View source
class UserViewsHooks {
    use StringTranslationTrait;
    
    /**
     * Implements hook_views_plugins_argument_validator_alter().
     */
    public function viewsPluginsArgumentValidatorAlter(array &$plugins) : void {
        $plugins['entity:user']['title'] = $this->t('User ID');
        $plugins['entity:user']['class'] = 'Drupal\\user\\Plugin\\views\\argument_validator\\User';
        $plugins['entity:user']['provider'] = 'user';
    }

}

Members

Title Sort descending Modifiers Object type Summary Overrides
StringTranslationTrait::$stringTranslation protected property The string translation service. 3
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language. 1
UserViewsHooks::viewsPluginsArgumentValidatorAlter public function Implements hook_views_plugins_argument_validator_alter().

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