UuidInterface::generate

public UuidInterface::generate() Generates a Universally Unique IDentifier (UUID). Return value A 16 byte integer represented as a hex string formatted with 4 hyphens. File core/lib/Drupal/Component/Uuid/UuidInterface.php, line 16 Class UuidInterface Interface for generating UUIDs. Namespace Drupal\Component\Uuid Code public function generate();

UuidInterface

Interface for generating UUIDs. Hierarchy interface \Drupal\Component\Uuid\UuidInterface File core/lib/Drupal/Component/Uuid/UuidInterface.php, line 8 Namespace Drupal\Component\Uuid Members Name Modifiers Type Description UuidInterface::generate public function Generates a Universally Unique IDentifier (UUID).

utility.inc

Miscellaneous functions. File core/includes/utility.inc Functions Name Description drupal_rebuild Rebuilds all caches even when Drupal itself does not work.

Utility classes and functions

Overview of utility classes and functions for developers. Drupal provides developers with a variety of utility functions that make it easier and more efficient to perform tasks that are either really common, tedious, or difficult. Utility functions help to reduce code duplication and should be used in place of one-off code whenever possible. See also common.inc File interface Formatting PHP wrapper functions Sanitization functions Transliteration Input validation File core/core.api.php, line 1

user_view_multiple

user_view_multiple($accounts, $view_mode = 'full', $langcode = NULL) Constructs a drupal_render() style array from an array of loaded users. Parameters \Drupal\user\UserInterface[] $accounts: An array of user accounts as returned by User::loadMultiple(). string $view_mode: (optional) View mode, e.g., 'full', 'teaser', etc. Defaults to 'teaser.' string|null $langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request. Return value a

user_views_query_substitutions

user_views_query_substitutions(ViewExecutable $view) Implements hook_views_query_substitutions(). Allow replacement of current userid so we can cache these queries. File core/modules/user/user.views_execution.inc, line 15 Provide views runtime hooks for user.module. Code function user_views_query_substitutions(ViewExecutable $view) { return array('***CURRENT_USER***' => \Drupal::currentUser()->id()); }

user_view

user_view($account, $view_mode = 'full', $langcode = NULL) Generate an array for rendering the given user. When viewing a user profile, the $page array contains: $page['content']['member_for']: Contains the default "Member for" profile data for a user. $page['content']['#user']: The user account of the profile being viewed. To theme user profiles, copy core/modules/user/templates/user.html.twig to your theme directory, and edit it as instructed in that file's comments. Parameters \Drupal\use

user_validate_name

user_validate_name($name) Verify the syntax of the given name. Parameters string $name: The user name to validate. Return value string|null A translated violation message if the name is invalid or NULL if the name is valid. File core/modules/user/user.module, line 267 Enables the user registration and login system. Code function user_validate_name($name) { $definition = BaseFieldDefinition::create('string') ->addConstraint('UserName', array()); $data = \Drupal::typedDataManager()

user_user_view_alter

user_user_view_alter(array &$build, UserInterface $account, EntityViewDisplayInterface $display) Implements hook_ENTITY_TYPE_view_alter() for user entities. This function adds a default alt tag to the user_picture field to maintain accessibility. File core/modules/user/user.module, line 387 Enables the user registration and login system. Code function user_user_view_alter(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { if (user_picture_enabled() &&a

user_user_view

user_user_view(array &$build, UserInterface $account, EntityViewDisplayInterface $display) Implements hook_ENTITY_TYPE_view() for user entities. File core/modules/user/user.module, line 372 Enables the user registration and login system. Code function user_user_view(array &$build, UserInterface $account, EntityViewDisplayInterface $display) { if ($display->getComponent('member_for')) { $build['member_for'] = array( '#type' => 'item', '#markup' => '<h4 cla