_batch_queue

_batch_queue($batch_set) Returns a queue object for a batch set. Parameters $batch_set: The batch set. Return value The queue object. Related topics Batch operations Creates and processes batch operations. File core/includes/form.inc, line 932 Functions for form and batch generation and processing. Code function _batch_queue($batch_set) { static $queues; if (!isset($queues)) { $queues = array(); } if (isset($batch_set['queue'])) { $name = $batch_set['queue']['name'];

ViewExecutable::addHandler

public ViewExecutable::addHandler($display_id, $type, $table, $field, $options = array(), $id = NULL) Adds an instance of a handler to the view. Items may be fields, filters, sort criteria, or arguments. Parameters string $display_id: The machine name of the display. string $type: The type of handler being added. string $table: The name of the table this handler is from. string $field: The name of the field this handler is from. array $options: (optional) Extra options for this instance. Defau

ViewExecutable::_build

public ViewExecutable::_build($key) Builds an individual set of handlers. This is an internal method. @todo Some filter needs this function, even it is internal. Parameters string $key: The type of handlers (filter etc.) which should be iterated over to build the relationship and query information. File core/modules/views/src/ViewExecutable.php, line 1334 Class ViewExecutable Represents a view as a whole. Namespace Drupal\views Code public function _build($key) { $handlers = &$t

RoleInterface::hasPermission

public RoleInterface::hasPermission($permission) Checks if the role has a permission. Parameters string $permission: The permission to check for. Return value bool TRUE if the role has the permission, FALSE if not. File core/modules/user/src/RoleInterface.php, line 42 Class RoleInterface Provides an interface defining a user role entity. Namespace Drupal\user Code public function hasPermission($permission);

_locale_rebuild_js

_locale_rebuild_js($langcode = NULL) (Re-)Creates the JavaScript translation file for a language. Parameters $langcode: The language, the translation file should be (re)created for. Return value bool TRUE if translation file exists, FALSE otherwise. File core/modules/locale/locale.module, line 1265 Enables the translation of the user interface to languages other than English. Code function _locale_rebuild_js($langcode = NULL) { $config = \Drupal::config('locale.settings'); if (!isset($l

hook_entity_field_access_alter

hook_entity_field_access_alter(array &$grants, array $context) Alter the default access behavior for a given field. Use this hook to override access grants from another module. Note that the original default access flag is masked under the ':default' key. Parameters \Drupal\Core\Access\AccessResultInterface[] $grants: An array of grants gathered by hook_entity_field_access(). The array is keyed by the module that defines the field's access control; the values are grant responses for each m

FieldItemList::createItem

protected FieldItemList::createItem($offset = 0, $value = NULL) Helper for creating a list item object. Return value \Drupal\Core\TypedData\TypedDataInterface Overrides ItemList::createItem File core/lib/Drupal/Core/Field/FieldItemList.php, line 39 Class FieldItemList Represents an entity field; that is, a list of field item objects. Namespace Drupal\Core\Field Code protected function createItem($offset = 0, $value = NULL) { return \Drupal::service('plugin.manager.field.field_type')

TwigNodeTrans::compileString

protected TwigNodeTrans::compileString(\Twig_Node $body) Extracts the text and tokens for the "trans" tag. Parameters \Twig_Node $body: The node to compile. Return value array Returns an array containing the two following parameters: string $text The extracted text. array $tokens The extracted tokens as new \Twig_Node_Expression_Name instances. File core/lib/Drupal/Core/Template/TwigNodeTrans.php, line 96 Class TwigNodeTrans A class that defines the Twig 'trans' tag for Drupal. Names

ViewExecutable::$request

Stores the current request object. Type: \Symfony\Component\HttpFoundation\Request File core/modules/views/src/ViewExecutable.php, line 327 Class ViewExecutable Represents a view as a whole. Namespace Drupal\views Code protected $request;

Comment::baseFieldDefinitions

public static Comment::baseFieldDefinitions(EntityTypeInterface $entity_type) Provides base field definitions for an entity type. Implementations typically use the class \Drupal\Core\Field\BaseFieldDefinition for creating the field definitions; for example a 'name' field could be defined as the following: $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')); By definition, base fields are fields that exist for every bundle. To provide definitions for fields that