Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UserData.php

function UserData::render

Overrides FieldPluginBase::render

File

core/modules/user/src/Plugin/views/field/UserData.php, line 109

Class

UserData
Provides access to the user data service.

Namespace

Drupal\user\Plugin\views\field

Code

public function render(ResultRow $values) {
    $uid = $this->getValue($values);
    $data = $this->userData
        ->get($this->options['data_module'], $uid, $this->options['data_name']);
    // Don't sanitize if no value was found.
    if (isset($data)) {
        return $this->sanitizeValue($data);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal