DateFormat::sort

public static DateFormat::sort(ConfigEntityInterface $a, ConfigEntityInterface $b) Helper callback for uasort() to sort configuration entities by weight and label. Overrides ConfigEntityBase::sort File core/lib/Drupal/Core/Datetime/Entity/DateFormat.php, line 87 Class DateFormat Defines the Date Format configuration entity class. Namespace Drupal\Core\Datetime\Entity Code public static function sort(ConfigEntityInterface $a, ConfigEntityInterface $b) { if ($a->isLocked() == $b->

MenuLinkContent::getWeight

public MenuLinkContent::getWeight() Returns the weight of the menu link content entity. Return value int A weight for use when ordering links. Overrides MenuLinkContentInterface::getWeight File core/modules/menu_link_content/src/Entity/MenuLinkContent.php, line 128 Class MenuLinkContent Defines the menu link content entity class. Namespace Drupal\menu_link_content\Entity Code public function getWeight() { return (int) $this->get('weight')->value; }

User::baseFieldDefinitions

public static User::baseFieldDefinitions(EntityTypeInterface $entity_type) Provides base field definitions for an entity type. Implementations typically use the class \Drupal\Core\Field\BaseFieldDefinition for creating the field definitions; for example a 'name' field could be defined as the following: $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')); By definition, base fields are fields that exist for every bundle. To provide definitions for fields that sho

RouteProvider::getSubscribedEvents

static RouteProvider::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) array('eventN

UserPasswordResetForm::buildForm

public UserPasswordResetForm::buildForm(array $form, FormStateInterface $form_state, AccountInterface $user = NULL, $expiration_date = NULL, $timestamp = NULL, $hash = NULL) Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. \Drupal\Core\Session\AccountInterface $user: User requesting reset. string $expiration_date: Formatted expiration date for the login link, or NULL if the link d

ConfigTranslationDeleteForm::__construct

public ConfigTranslationDeleteForm::__construct(ConfigurableLanguageManagerInterface $language_manager, ConfigMapperManagerInterface $config_mapper_manager, ModuleHandlerInterface $module_handler) Constructs a ConfigTranslationDeleteForm. Parameters \Drupal\language\ConfigurableLanguageManagerInterface $language_manager: The language override configuration storage. \Drupal\config_translation\ConfigMapperManagerInterface $config_mapper_manager: The configuration mapper manager. \Drupal\Core\Ext

RouteMatch::getParameterNames

protected RouteMatch::getParameterNames() Returns the names of all parameters for the currently matched route. Return value array Route parameter names as both the keys and values. File core/lib/Drupal/Core/Routing/RouteMatch.php, line 143 Class RouteMatch Default object representing the results of routing. Namespace Drupal\Core\Routing Code protected function getParameterNames() { $names = array(); if ($route = $this->getRouteObject()) { // Variables defined in path and ho

FormState::setFormObject

public FormState::setFormObject(FormInterface $form_object) Sets the form object that is responsible for building this form. Parameters \Drupal\Core\Form\FormInterface $form_object: The form object. Return value $this Overrides FormStateInterface::setFormObject File core/lib/Drupal/Core/Form/FormState.php, line 1157 Class FormState Stores information about the state of a form. Namespace Drupal\Core\Form Code public function setFormObject(FormInterface $form_object) { $this->addB

FormState::getFormObject

public FormState::getFormObject() Returns the form object that is responsible for building this form. Return value \Drupal\Core\Form\FormInterface The form object. Overrides FormStateInterface::getFormObject File core/lib/Drupal/Core/Form/FormState.php, line 1165 Class FormState Stores information about the state of a form. Namespace Drupal\Core\Form Code public function getFormObject() { return $this->getBuildInfo()['callback_object']; }

Upsert

MySQL implementation of \Drupal\Core\Database\Query\Upsert. Hierarchy class \Drupal\Core\Database\Query\Query implements PlaceholderInterfaceclass \Drupal\Core\Database\Query\Upsert implements \Countable uses InsertTraitclass \Drupal\Core\Database\Driver\mysql\Upsert File core/lib/Drupal/Core/Database/Driver/mysql/Upsert.php, line 10 Namespace Drupal\Core\Database\Driver\mysql Members Name Modifiers Type Description InsertTrait::$defaultFields protected property An arr