EntityConstraintViolationList::add

public EntityConstraintViolationList::add(ConstraintViolationInterface $violation) Adds a constraint violation to this list. Parameters ConstraintViolationInterface $violation The violation to add.: Overrides ConstraintViolationList::add File core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php, line 186 Class EntityConstraintViolationList Implements an entity constraint violation list. Namespace Drupal\Core\Entity Code public function add(ConstraintViolationInterface $violat

NodeTypeInterface::setNewRevision

public NodeTypeInterface::setNewRevision($new_revision) Sets whether a new revision should be created by default. Parameters bool $new_revision_: TRUE if a new revision should be created by default. File core/modules/node/src/NodeTypeInterface.php, line 34 Class NodeTypeInterface Provides an interface defining a node type entity. Namespace Drupal\node Code public function setNewRevision($new_revision);

CommentInterface::setPublished

public CommentInterface::setPublished($status) Sets the published status of the comment entity. Parameters bool $status: Set to TRUE to publish the comment, FALSE to unpublish. Return value \Drupal\comment\CommentInterface The class instance that this method is called on. File core/modules/comment/src/CommentInterface.php, line 219 Class CommentInterface Provides an interface defining a comment entity. Namespace Drupal\comment Code public function setPublished($status);

RefinableCacheableDependencyTrait::addCacheTags

public RefinableCacheableDependencyTrait::addCacheTags(array $cache_tags) Adds cache tags. Parameters string[] $cache_tags: The cache tags to be added. Return value $this Overrides RefinableCacheableDependencyInterface::addCacheTags File core/lib/Drupal/Core/Cache/RefinableCacheableDependencyTrait.php, line 81 Class RefinableCacheableDependencyTrait Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. Namespace Drupal\Core\Cache Code public function addCacheTags(array

ThemeNegotiatorInterface::determineActiveTheme

public ThemeNegotiatorInterface::determineActiveTheme(RouteMatchInterface $route_match) Determine the active theme for the request. Parameters \Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object. Return value string|null The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead. File core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php, line 46 Class ThemeNegotiatorInterface Defines an interface for c

hook_render_template

hook_render_template($template_file, $variables) Render a template using the theme engine. Parameters string $template_file: The path (relative to the Drupal root directory) to the template to be rendered including its extension in the format 'path/to/TEMPLATE_NAME.EXT'. array $variables: A keyed array of variables that are available for composing the output. The theme engine is responsible for passing all the variables to the template. Depending on the code in the template, all or just a subs

_drupal_exception_handler

_drupal_exception_handler($exception) Provides custom PHP exception handling. Uncaught exceptions are those not enclosed in a try/catch block. They are always fatal: the execution of the script will stop as soon as the exception handler exits. Parameters \Exception|\Throwable $exception: The exception object that was thrown. File core/includes/bootstrap.inc, line 561 Functions that need to be loaded on every Drupal request. Code function _drupal_exception_handler($exception) { require_once

RecursiveValidator::validate

public RecursiveValidator::validate($value, $constraints = NULL, $groups = NULL) Validates a value against a constraint or a list of constraints. If no constraint is passed, the constraint {@link \Symfony\Component\Validator\Constraints\Valid} is assumed. Parameters mixed $value The value to validate: Constraint|Constraint[] $constraints The constraint(s) to validate: against array|null $groups The validation groups to: validate. If none is given, "Default" is assumed Return value ConstraintV

Container::set

public Container::set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) Overrides Container::set File core/lib/Drupal/Core/DependencyInjection/Container.php, line 16 Class Container Extends the Drupal container to set the service ID on the created object. Namespace Drupal\Core\DependencyInjection Code public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) { parent::set($id, $service, $scope); // Ensure that the _serviceId property is set on syn

ThemeHandlerInterface

Manages the list of available themes. Hierarchy interface \Drupal\Core\Extension\ThemeHandlerInterface File core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php, line 8 Namespace Drupal\Core\Extension Members Name Modifiers Type Description ThemeHandlerInterface::addTheme public function Adds a theme extension to the internal listing. ThemeHandlerInterface::getBaseThemes public function Finds all the base themes for the specified theme. ThemeHandlerInterfac