FieldItemInterface::deleteRevision

public FieldItemInterface::deleteRevision() Defines custom revision delete behavior for field values. This method is called from during the process of deleting an entity revision, just before the field values are deleted from storage. It is only called for entity types that support revisioning. File core/lib/Drupal/Core/Field/FieldItemInterface.php, line 230 Class FieldItemInterface Interface for entity field items. Namespace Drupal\Core\Field Code public function deleteRevision();

ModerationStateListBuilder::buildRow

public ModerationStateListBuilder::buildRow(EntityInterface $entity) Builds a row for an entity in the entity listing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list. Return value array A render array structure of fields for this entity. Overrides DraggableListBuilder::buildRow See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/content_moderation/src/ModerationStateListBuilder.php, line 33 Class ModerationStateListBuild

CommentManager::forbiddenMessage

public CommentManager::forbiddenMessage(EntityInterface $entity, $field_name) Provides a message if posting comments is forbidden. If authenticated users can post comments, a message is returned that prompts the anonymous user to log in (or register, if applicable) that redirects to entity comment form. Otherwise, no message is returned. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity to which comments are attached to. string $field_name: The field name on the entity to whic

ThemeManager::alter

public ThemeManager::alter($type, &$data, &$context1 = NULL, &$context2 = NULL) Passes alterable variables to specific $theme_TYPE_alter() implementations. Executes an alter hook on the current theme. It also invokes alter hooks for all base themes. $theme specifies the theme name of the active theme and all its base themes. This dispatch function hands off the passed-in variables to type-specific $theme_TYPE_alter() implementations in the active theme. It ensures a consistent inter

archiver_get_extensions

archiver_get_extensions() Returns a string of supported archive extensions. Return value A space-separated string of extensions suitable for use by the file validation system. File core/includes/common.inc, line 1219 Common functions that many Drupal modules will need to reference. Code function archiver_get_extensions() { $valid_extensions = array(); foreach (\Drupal::service('plugin.manager.archiver')->getDefinitions() as $archive) { foreach ($archive['extensions'] as $extension

ConditionAccessResolverTrait::resolveConditions

protected ConditionAccessResolverTrait::resolveConditions($conditions, $condition_logic) Resolves the given conditions based on the condition logic ('and'/'or'). Parameters \Drupal\Core\Condition\ConditionInterface[] $conditions: A set of conditions. string $condition_logic: The logic used to compute access, either 'and' or 'or'. Return value bool Whether these conditions grant or deny access. File core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php, line 23 Class ConditionAcc

Drupal::hasRequest

public static Drupal::hasRequest() Indicates if there is a currently active request object. Return value bool TRUE if there is a currently active request object, FALSE otherwise. File core/lib/Drupal.php, line 190 Contains \Drupal. Class Drupal Static Service Container wrapper. Code public static function hasRequest() { // Check hasContainer() first in order to always return a Boolean. return static::hasContainer() && static::getContainer()->has('request_stack') &&

TypedDataInterface::createInstance

public static TypedDataInterface::createInstance($definition, $name = NULL, TraversableTypedDataInterface $parent = NULL) Constructs a TypedData object given its definition and context. @todo When \Drupal\Core\Config\TypedConfigManager has been fixed to use class-based definitions, type-hint $definition to DataDefinitionInterface. https://www.drupal.org/node/1928868 Parameters \Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition. string|null $name: (optional) The nam

TextFormat::getTranslationElement

public TextFormat::getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) Returns the translation form element for a given configuration definition. For complex data structures (such as mappings) that are translatable wholesale but contain non-translatable properties, the form element is responsible for checking access to the source value of those properties. In case of formatted text, for example, access to the source text format must be checked. If

ViewExecutable::$viewsData

The views data. Type: \Drupal\views\ViewsData File core/modules/views/src/ViewExecutable.php, line 422 Class ViewExecutable Represents a view as a whole. Namespace Drupal\views Code protected $viewsData;