common.inc

Common functions that many Drupal modules will need to reference. The functions that are critical and need to be available even when serving a cached page are instead located in bootstrap.inc. File core/includes/common.inc Functions Name Description archiver_get_archiver Creates the appropriate archiver for the specified file. archiver_get_extensions Returns a string of supported archive extensions. base_path Returns the base URL path (i.e., directory) of the Drupal installati

ConstraintViolationBuilder::setTranslationDomain

public ConstraintViolationBuilder::setTranslationDomain($translationDomain) Sets the translation domain which should be used for translating the violation message. Parameters string $translationDomain The translation domain: Return value ConstraintViolationBuilderInterface This builder Overrides ConstraintViolationBuilderInterface::setTranslationDomain See also \Symfony\Component\Translation\TranslatorInterface File core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php, li

ToolbarItem

Provides a toolbar item that is wrapped in markup for common styling. The 'tray' property contains a renderable array. Plugin annotation @RenderElement("toolbar_item") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements ElementInterfaceclass \Drupal\toolbar\Element\ToolbarItem

UPDATE_NOT_CHECKED

Project's status cannot be checked. File core/modules/update/update.module, line 49 Handles updates of Drupal core and contributed projects. Code const UPDATE_NOT_CHECKED = -1;

SqlContentEntityStorage::requiresFieldStorageSchemaChanges

public SqlContentEntityStorage::requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) Checks if the changes to the storage definition requires schema changes. Parameters \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The updated field storage definition. \Drupal\Core\Field\FieldStorageDefinitionInterface $original: The original field storage definition. Return value bool TRUE if storage schema

BaseFieldOverride::getFieldStorageDefinition

public BaseFieldOverride::getFieldStorageDefinition() Returns the field storage definition. Return value \Drupal\Core\Field\FieldStorageDefinitionInterface The field storage definition. Overrides FieldDefinitionInterface::getFieldStorageDefinition File core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php, line 112 Class BaseFieldOverride Defines the base field override entity. Namespace Drupal\Core\Field\Entity Code public function getFieldStorageDefinition() { return $this->g

DrupalKernel::findSitePath

public static DrupalKernel::findSitePath(Request $request, $require_settings = TRUE, $app_root = NULL) Returns the appropriate site directory for a request. Once the kernel has been created DrupalKernelInterface::getSitePath() is preferred since it gets the statically cached result of this method. Site directories contain all site specific code. This includes settings.php for bootstrap level configuration, file configuration stores, public file storage and site specific modules and themes. Find

ModulesListConfirmForm

Builds a confirmation form for enabling modules with dependencies. Hierarchy class \Drupal\Core\Form\FormBase implements ContainerInjectionInterface, FormInterface uses DependencySerializationTrait, LoggerChannelTrait, LinkGeneratorTrait, RedirectDestinationTrait, UrlGeneratorTrait, StringTranslationTraitclass \Drupal\Core\Form\ConfirmFormBase implements ConfirmFormInterfaceclass \Drupal\system\Form\ModulesListConfirmForm File core/modules/system/src/Form/ModulesListConfirmForm.php, line 1

LanguageManager::setConfigOverrideLanguage

public LanguageManager::setConfigOverrideLanguage(LanguageInterface $language = NULL) This function is a noop since the configuration cannot be overridden by language unless the Language module is enabled. That replaces the default language manager with a configurable language manager. Overrides LanguageManagerInterface::setConfigOverrideLanguage See also \Drupal\language\ConfigurableLanguageManager::setConfigOverrideLanguage() File core/lib/Drupal/Core/Language/LanguageManager.php, line 362

Schema::addIndex

public Schema::addIndex($table, $name, $fields, array $spec) Add an index. @todo remove the $spec argument whenever schema introspection is added. Parameters $table: The table to be altered. $name: The name of the index. $fields: An array of field names or field information; if field information is passed, it's an array whose first element is the field name and whose second is the maximum length in the index. For example, the following will use the full length of the `foo` field, but limit the