hook_entity_type_build

hook_entity_type_build(array &$entity_types) Add to entity type definitions. Modules may implement this hook to add information to defined entity types, as defined in \Drupal\Core\Entity\EntityTypeInterface. To alter existing information or to add information dynamically, use hook_entity_type_alter(). Parameters \Drupal\Core\Entity\EntityTypeInterface[] $entity_types: An associative array of all entity type definitions, keyed by the entity type name. Passed by reference. See also \Drupal\

AccessResultAllowed

Value object indicating an allowed access result, with cacheability metadata. Hierarchy class \Drupal\Core\Access\AccessResult implements AccessResultInterface, RefinableCacheableDependencyInterface uses RefinableCacheableDependencyTraitclass \Drupal\Core\Access\AccessResultAllowed File core/lib/Drupal/Core/Access/AccessResultAllowed.php, line 8 Namespace Drupal\Core\Access Members Name Modifiers Type Description AccessResult::allowed public static function Creates an A

hook_entity_bundle_field_info_alter

hook_entity_bundle_field_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type, $bundle) Alter bundle field definitions. @todo WARNING: This hook will be changed in https://www.drupal.org/node/2346347. Parameters \Drupal\Core\Field\FieldDefinitionInterface[] $fields: The array of bundle field definitions. \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. string $bundle: The bundle. See also hook_entity_base_field_info() hook_entity_base_

EntityTypeInterface::getAdminPermission

public EntityTypeInterface::getAdminPermission() Gets the name of the default administrative permission. The default \Drupal\Core\Entity\EntityAccessControlHandler class checks this permission for all operations in its checkAccess() method. Entities with more complex permissions can extend this class to do their own access checks. Return value string|bool File core/lib/Drupal/Core/Entity/EntityTypeInterface.php, line 387 Class EntityTypeInterface Provides an interface for an entity type a

user_form_process_password_confirm

user_form_process_password_confirm($element) Form element process handler for client-side password validation. This #process handler is automatically invoked for 'password_confirm' form elements to add the JavaScript and string translations for dynamic password validation. File core/modules/user/user.module, line 1240 Enables the user registration and login system. Code function user_form_process_password_confirm($element) { $password_settings = array( 'confirmTitle' => t('Passwords

SearchQuery::parseWord

protected SearchQuery::parseWord($word) Parses a word or phrase for parseQuery(). Splits a phrase into words. Adds its words to $this->words, if it is not already there. Returns a list containing the number of new words found, and the total number of words in the phrase. File core/modules/search/src/SearchQuery.php, line 358 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code protected function parseWord($word) { $num_new_scores = 0; $num_v

filter_formats

filter_formats(AccountInterface $account = NULL) Retrieves a list of enabled text formats, ordered by weight. Parameters \Drupal\Core\Session\AccountInterface|null $account: (optional) If provided, only those formats that are allowed for this user account will be returned. All enabled formats will be returned otherwise. Defaults to NULL. Return value \Drupal\filter\FilterFormatInterface[] An array of text format objects, keyed by the format ID and ordered by weight. See also filter_formats_r

SSH::copyDirectoryJailed

protected SSH::copyDirectoryJailed($source, $destination) Copies a directory. We need a separate method to make sure the $destination is in the jail. Parameters string $source: The source path. string $destination: The destination path. Overrides FileTransfer::copyDirectoryJailed File core/lib/Drupal/Core/FileTransfer/SSH.php, line 57 Class SSH The SSH connection class for the update module. Namespace Drupal\Core\FileTransfer Code protected function copyDirectoryJailed($source, $desti

EntityDisplayBase::getTargetEntityTypeId

public EntityDisplayBase::getTargetEntityTypeId() Gets the entity type for which this display is used. Return value string The entity type id. Overrides EntityDisplayInterface::getTargetEntityTypeId File core/lib/Drupal/Core/Entity/EntityDisplayBase.php, line 198 Class EntityDisplayBase Provides a common base class for entity view and form displays. Namespace Drupal\Core\Entity Code public function getTargetEntityTypeId() { return $this->targetEntityType; }

MenuLinkBase::getUrlObject

public MenuLinkBase::getUrlObject($title_attribute = TRUE) Returns a URL object containing either the external path or route. Parameters bool $title_attribute: (optional) If TRUE, add the link description as the title attribute if the description is not empty. Return value \Drupal\Core\Url A URL object containing either the external path or route. Overrides MenuLinkInterface::getUrlObject File core/lib/Drupal/Core/Menu/MenuLinkBase.php, line 122 Class MenuLinkBase Defines a base menu lin