updated core and modules

This commit is contained in:
Bachir Soussi Chiadmi
2017-09-09 16:27:51 +02:00
parent 027aa99b32
commit 41863f872c
7810 changed files with 318922 additions and 83631 deletions
+42 -6
View File
@@ -81,7 +81,7 @@ class Drupal {
/**
* The current system version.
*/
const VERSION = '8.1.8';
const VERSION = '8.3.7';
/**
* Core API compatibility.
@@ -181,6 +181,16 @@ class Drupal {
return static::getContainer()->get('app.root');
}
/**
* Gets the active install profile.
*
* @return string|null
* The name of the active install profile.
*/
public static function installProfile() {
return static::getContainer()->getParameter('install_profile');
}
/**
* Indicates if there is a currently active request object.
*
@@ -299,6 +309,23 @@ class Drupal {
return static::getContainer()->get('cache.' . $bin);
}
/**
* Retrieves the class resolver.
*
* This is to be used in procedural code such as module files to instantiate
* an object of a class that implements
* \Drupal\Core\DependencyInjection\ContainerInjectionInterface.
*
* One common usecase is to provide a class which contains the actual code
* of a hook implementation, without having to create a service.
*
* @return \Drupal\Core\DependencyInjection\ClassResolverInterface
* The class resolver.
*/
public static function classResolver() {
return static::getContainer()->get('class_resolver');
}
/**
* Returns an expirable key value store collection.
*
@@ -433,7 +460,7 @@ class Drupal {
* The query object that can query the given entity type.
*/
public static function entityQuery($entity_type, $conjunction = 'AND') {
return static::getContainer()->get('entity.query')->get($entity_type, $conjunction);
return static::entityTypeManager()->getStorage($entity_type)->getQuery($conjunction);
}
/**
@@ -450,7 +477,7 @@ class Drupal {
* The query object that can query the given entity type.
*/
public static function entityQueryAggregate($entity_type, $conjunction = 'AND') {
return static::getContainer()->get('entity.query')->getAggregate($entity_type, $conjunction);
return static::entityTypeManager()->getStorage($entity_type)->getAggregateQuery($conjunction);
}
/**
@@ -539,7 +566,7 @@ class Drupal {
* Instead create a \Drupal\Core\Url object directly, for example using
* Url::fromRoute().
*/
public static function url($route_name, $route_parameters = array(), $options = array(), $collect_bubbleable_metadata = FALSE) {
public static function url($route_name, $route_parameters = [], $options = [], $collect_bubbleable_metadata = FALSE) {
return static::getContainer()->get('url_generator')->generateFromRoute($route_name, $route_parameters, $options, $collect_bubbleable_metadata);
}
@@ -556,8 +583,7 @@ class Drupal {
* Renders a link with a given link text and Url object.
*
* This method is a convenience wrapper for the link generator service's
* generate() method. For detailed documentation, see
* \Drupal\Core\Routing\LinkGeneratorInterface::generate().
* generate() method.
*
* @param string $text
* The link text for the anchor tag.
@@ -721,4 +747,14 @@ class Drupal {
return static::getContainer()->get('entity.definition_update_manager');
}
/**
* Returns the time service.
*
* @return \Drupal\Component\Datetime\TimeInterface
* The time service.
*/
public static function time() {
return static::getContainer()->get('datetime.time');
}
}