Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -81,7 +81,7 @@ class Drupal {
/**
* The current system version.
*/
const VERSION = '8.2.7';
const VERSION = '8.3.0';
/**
* 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);
}
@ -720,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');
}
}