RfcLoggerTrait::info

public RfcLoggerTrait::info($message, array $context = array()) Interesting events. Example: User logs in, SQL logs. Parameters string $message: array $context: Return value null Overrides LoggerInterface::info File core/lib/Drupal/Core/Logger/RfcLoggerTrait.php, line 62 Class RfcLoggerTrait A copy of \Psr\Log\LoggerTrait that uses RFC 5424 compliant log levels. Namespace Drupal\Core\Logger Code public function info($message, array $context = array()) { $this->log(RfcLogLevel::I

QueryFactory::__construct

public QueryFactory::__construct(Connection $connection) Constructs a QueryFactory object. Parameters \Drupal\Core\Database\Connection $connection: The database connection used by the entity query. File core/lib/Drupal/Core/Entity/Query/Sql/QueryFactory.php, line 38 Class QueryFactory Factory class creating entity query objects for the SQL backend. Namespace Drupal\Core\Entity\Query\Sql Code public function __construct(Connection $connection) { $this->connection = $connection;

ContentEntityStorageBase::doSaveFieldItems

abstract protected ContentEntityStorageBase::doSaveFieldItems(ContentEntityInterface $entity, array $names = []) Writes entity field values to the storage. This method is responsible for allocating entity and revision identifiers and updating the entity object with their values. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity object. string[] $names: (optional) The name of the fields to be written to the storage. If an empty value is passed all field values are saved.

FileStorage::save

public FileStorage::save($name, $code) Saves PHP code to storage. Parameters string $name: The virtual file name. Can be a relative path. string $code: The PHP code to be saved. Return value bool TRUE if the save succeeded, FALSE if it failed. Overrides PhpStorageInterface::save File core/lib/Drupal/Component/PhpStorage/FileStorage.php, line 49 Class FileStorage Stores the code as regular PHP files. Namespace Drupal\Component\PhpStorage Code public function save($name, $code) { $pa

ChainedPlaceholderStrategy::processPlaceholders

public ChainedPlaceholderStrategy::processPlaceholders(array $placeholders) Processes placeholders to render them with different strategies. Parameters array $placeholders: The placeholders to process, with the keys being the markup for the placeholders and the values the corresponding render array describing the data to be rendered. Return value array The resulting placeholders, with a subset of the keys of $placeholders (and those being the markup for the placeholders) but with the correspo

SourceString::isNew

public SourceString::isNew() Checks whether the object is not saved to storage yet. Return value bool TRUE if the object exists in the storage, FALSE otherwise. Overrides StringInterface::isNew File core/modules/locale/src/SourceString.php, line 45 Class SourceString Defines the locale source string object. Namespace Drupal\locale Code public function isNew() { return empty($this->lid); }

hook_entity_view_mode_alter

hook_entity_view_mode_alter(&$view_mode, Drupal\Core\Entity\EntityInterface $entity, $context) Change the view mode of an entity that is being displayed. Parameters string $view_mode: The view_mode that is to be used to display the entity. \Drupal\Core\Entity\EntityInterface $entity: The entity that is being viewed. array $context: Array with additional context information, currently only contains the langcode the entity is viewed in. Related topics Entity CRUD, editing, and view hooks Hoo

MetadataBubblingUrlGenerator

Decorator for the URL generator, which bubbles bubbleable URL metadata. Implements a decorator for the URL generator that allows to automatically collect and bubble up bubbleable metadata associated with URLs due to outbound path and route processing. This approach helps keeping the render and the routing subsystems decoupled. Hierarchy class \Drupal\Core\Render\MetadataBubblingUrlGenerator implements UrlGeneratorInterface See also \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface

ContentEntityBase::getLanguages

protected ContentEntityBase::getLanguages() File core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 238 Class ContentEntityBase Implements Entity Field API specific enhancements to the Entity class. Namespace Drupal\Core\Entity Code protected function getLanguages() { if (empty($this->languages)) { $this->languages = $this->languageManager()->getLanguages(LanguageInterface::STATE_ALL); // If the entity references a language that is not or no longer available,

PageDisplayVariantSelectionEvent::$routeMatch

The current route match. Type: \Drupal\Core\Routing\RouteMatchInterface File core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php, line 45 Class PageDisplayVariantSelectionEvent Event fired when rendering main content, to select a page display variant. Namespace Drupal\Core\Render Code protected $routeMatch;