InlineTemplate

Provides a render element where the user supplies an in-line Twig template. Properties: #template: The inline Twig template used to render the element. #context: (array) The variables to substitute into the Twig template. Each variable may be a string or a render array. Usage example: $build['hello'] = [ '#type' => 'inline_template', '#template' => "{% trans %} Hello {% endtrans %} <strong>{{name}}</strong>", '#context' => [ 'name' => $name, ] ]; Plugin

user_cookie_save

user_cookie_save(array $values) Saves visitor information as a cookie so it can be reused. Parameters array $values: An array of key/value pairs to be saved into a cookie. File core/modules/user/user.module, line 1287 Enables the user registration and login system. Code function user_cookie_save(array $values) { foreach ($values as $field => $value) { // Set cookie for 365 days. setrawcookie('Drupal.visitor.' . $field, rawurlencode($value), REQUEST_TIME + 31536000, '/'); } }

EntityFieldManager::getFieldMapByFieldType

public EntityFieldManager::getFieldMapByFieldType($field_type) Gets a lightweight map of fields across bundles filtered by field type. Parameters string $field_type: The field type to filter by. Return value array An array keyed by entity type. Each value is an array which keys are field names and value is an array with two entries: type: The field type. bundles: An associative array of the bundles in which the field appears, where the keys and values are both the bundle's machine name. O

BlockBase::setConfiguration

public BlockBase::setConfiguration(array $configuration) Sets the configuration for this plugin instance. Parameters array $configuration: An associative array containing the plugin's configuration. Overrides ConfigurablePluginInterface::setConfiguration File core/lib/Drupal/Core/Block/BlockBase.php, line 71 Class BlockBase Defines a base block implementation that most blocks plugins will extend. Namespace Drupal\Core\Block Code public function setConfiguration(array $configuration) {

SubformState::setLimitValidationErrors

public SubformState::setLimitValidationErrors($limit_validation_errors) Sets the limited validation error sections. Parameters array|null $limit_validation_errors: The limited validation error sections. Return value $this Overrides FormStateDecoratorBase::setLimitValidationErrors See also \Drupal\Core\Form\FormState::$limit_validation_errors File core/lib/Drupal/Core/Form/SubformState.php, line 122 Class SubformState Stores information about the state of a subform. Namespace Drupal\C

EntityStorageBase::delete

public EntityStorageBase::delete(array $entities) Deletes permanently saved entities. Parameters array $entities: An array of entity objects to delete. Throws \Drupal\Core\Entity\EntityStorageException In case of failures, an exception is thrown. Overrides EntityStorageInterface::delete File core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 343 Class EntityStorageBase A base entity storage class. Namespace Drupal\Core\Entity Code public function delete(array $entities) { if (

LocalReadOnlyStream

Defines a read-only Drupal stream wrapper base class for local files. This class extends the complete stream wrapper implementation in LocalStream. URIs such as "public://example.txt" are expanded to a normal filesystem path such as "sites/default/files/example.txt" and then PHP filesystem functions are invoked. Drupal\Core\StreamWrapper\LocalReadOnlyStream implementations need to implement at least the getDirectoryPath() and getExternalUrl() methods. Hierarchy class \Drupal\Core\StreamWrapper\

ImageEffectInterface::label

public ImageEffectInterface::label() Returns the image effect label. Return value string The image effect label. File core/modules/image/src/ImageEffectInterface.php, line 78 Class ImageEffectInterface Defines the interface for image effects. Namespace Drupal\image Code public function label();

BlockListBuilder::getFormId

public BlockListBuilder::getFormId() Returns a unique string identifying the form. Return value string The unique string identifying the form. Overrides FormInterface::getFormId File core/modules/block/src/BlockListBuilder.php, line 112 Class BlockListBuilder Defines a class to build a listing of block entities. Namespace Drupal\block Code public function getFormId() { return 'block_admin_display_form'; }

ConditionFundamentals::$conditions

Array of conditions. Type: array File core/lib/Drupal/Core/Entity/Query/ConditionFundamentals.php, line 15 Class ConditionFundamentals Common code for all implementations of the entity query condition interfaces. Namespace Drupal\Core\Entity\Query Code protected $conditions = array();