DrupalDateTime

Extends DateTimePlus(). This class extends the basic component and adds in Drupal-specific handling, like translation of the format() method. Static methods in base class can also be used to create DrupalDateTime objects. For example: DrupalDateTime::createFromArray( array('year' => 2010, 'month' => 9, 'day' => 28) ) Hierarchy class \Drupal\Component\Datetime\DateTimePlus uses ToStringTraitclass \Drupal\Core\Datetime\DrupalDateTime uses StringTranslationTrait See also \Drupal/Comp

ModulesUninstallForm::submitForm

public ModulesUninstallForm::submitForm(array &$form, FormStateInterface $form_state) Form submission handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormInterface::submitForm File core/modules/system/src/Form/ModulesUninstallForm.php, line 178 Class ModulesUninstallForm Provides a form for uninstalling modules. Namespace Drupal\system\Form Code pu

DatabaseStorage::doWrite

protected DatabaseStorage::doWrite($name, $data) Helper method so we can re-try a write. Parameters string $name: The config name. string $data: The config data, already dumped to a string. Return value bool File core/lib/Drupal/Core/Config/DatabaseStorage.php, line 145 Class DatabaseStorage Defines the Database storage. Namespace Drupal\Core\Config Code protected function doWrite($name, $data) { $options = array('return' => Database::RETURN_AFFECTED) + $this->options; retu

EntityTypeManagerInterface::getRouteProviders

public EntityTypeManagerInterface::getRouteProviders($entity_type) Gets all route provider instances. Parameters string $entity_type: The entity type for this route providers. Return value \Drupal\Core\Entity\Routing\EntityRouteProviderInterface[] File core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php, line 80 Class EntityTypeManagerInterface Provides an interface for entity type managers. Namespace Drupal\Core\Entity Code public function getRouteProviders($entity_type);

EntityRepositoryInterface::getTranslationFromContext

public EntityRepositoryInterface::getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = array()) Gets the entity translation to be used in the given context. This will check whether a translation for the desired language is available and if not, it will fall back to the most appropriate translation based on the provided context. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity whose translation will be returned. string $langcode: (optional) The langu

NullStorage::rename

public NullStorage::rename($name, $new_name) Renames a configuration object in the storage. Parameters string $name: The name of a configuration object to rename. string $new_name: The new name of a configuration object. Return value bool TRUE on success, FALSE otherwise. Overrides StorageInterface::rename File core/lib/Drupal/Core/Config/NullStorage.php, line 59 Class NullStorage Defines a stub storage. Namespace Drupal\Core\Config Code public function rename($name, $new_name) { r

ContactForm::getRecipients

public ContactForm::getRecipients() Returns list of recipient email addresses. Return value array List of recipient email addresses. Overrides ContactFormInterface::getRecipients File core/modules/contact/src/Entity/ContactForm.php, line 117 Class ContactForm Defines the contact form entity. Namespace Drupal\contact\Entity Code public function getRecipients() { return $this->recipients; }

DependencySerializationTrait::__wakeup

public DependencySerializationTrait::__wakeup() File core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php, line 46 Class DependencySerializationTrait Provides dependency injection friendly methods for serialization. Namespace Drupal\Core\DependencyInjection Code public function __wakeup() { // Tests in isolation potentially unserialize in the parent process. if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP']) && !\Drupal::hasContainer()) { return; } $con

_toolbar_get_subtrees_hash

_toolbar_get_subtrees_hash() Returns the hash of the per-user rendered toolbar subtrees. Return value string The hash of the admin_menu subtrees. File core/modules/toolbar/toolbar.module, line 354 Administration toolbar for quick access to top level administration items. Code function _toolbar_get_subtrees_hash() { list($subtrees, $cacheability) = toolbar_get_rendered_subtrees(); $hash = Crypt::hashBase64(serialize($subtrees)); return [$hash, $cacheability]; }

EntityType::getLinkTemplates

public EntityType::getLinkTemplates() Gets the link templates using the URI template syntax. Links are an array of standard link relations to the URI template that should be used for them. Where possible, link relationships should use established IANA relationships rather than custom relationships. Every entity type should, at minimum, define "canonical", which is the pattern for URIs to that entity. Even if the entity will have no HTML page exposed to users it should still have a canonical URI