Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713
This commit is contained in:
parent
c0a0d5a94c
commit
9eae24d844
669 changed files with 3873 additions and 1553 deletions
|
@ -55,6 +55,8 @@ class Url {
|
|||
/**
|
||||
* The URL options.
|
||||
*
|
||||
* See \Drupal\Core\Url::fromUri() for details on the options.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $options = array();
|
||||
|
@ -101,21 +103,7 @@ class Url {
|
|||
* @param array $route_parameters
|
||||
* (optional) An associative array of parameter names and values.
|
||||
* @param array $options
|
||||
* (optional) An associative array of additional options, with the following
|
||||
* elements:
|
||||
* - 'query': An array of query key/value-pairs (without any URL-encoding)
|
||||
* to append to the URL. Merged with the parameters array.
|
||||
* - 'fragment': A fragment identifier (named anchor) to append to the URL.
|
||||
* Do not include the leading '#' character.
|
||||
* - 'absolute': Defaults to FALSE. Whether to force the output to be an
|
||||
* absolute link (beginning with http:). Useful for links that will be
|
||||
* displayed outside the site, such as in an RSS feed.
|
||||
* - 'language': An optional language object used to look up the alias
|
||||
* for the URL. If $options['language'] is omitted, it defaults to the
|
||||
* current language for the language type LanguageInterface::TYPE_URL.
|
||||
* - 'https': Whether this URL should point to a secure location. If not
|
||||
* defined, the current scheme is used, so the user stays on HTTP or HTTPS
|
||||
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP.
|
||||
* See \Drupal\Core\Url::fromUri() for details.
|
||||
*
|
||||
* @see static::fromRoute()
|
||||
* @see static::fromUri()
|
||||
|
@ -141,21 +129,7 @@ class Url {
|
|||
* @param array $route_parameters
|
||||
* (optional) An associative array of route parameter names and values.
|
||||
* @param array $options
|
||||
* (optional) An associative array of additional URL options, with the
|
||||
* following elements:
|
||||
* - 'query': An array of query key/value-pairs (without any URL-encoding)
|
||||
* to append to the URL. Merged with the parameters array.
|
||||
* - 'fragment': A fragment identifier (named anchor) to append to the URL.
|
||||
* Do not include the leading '#' character.
|
||||
* - 'absolute': Defaults to FALSE. Whether to force the output to be an
|
||||
* absolute link (beginning with http:). Useful for links that will be
|
||||
* displayed outside the site, such as in an RSS feed.
|
||||
* - 'language': An optional language object used to look up the alias
|
||||
* for the URL. If $options['language'] is omitted, it defaults to the
|
||||
* current language for the language type LanguageInterface::TYPE_URL.
|
||||
* - 'https': Whether this URL should point to a secure location. If not
|
||||
* defined, the current scheme is used, so the user stays on HTTP or HTTPS
|
||||
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP.
|
||||
* See \Drupal\Core\Url::fromUri() for details.
|
||||
*
|
||||
* @return \Drupal\Core\Url
|
||||
* A new Url object for a routed (internal to Drupal) URL.
|
||||
|
@ -254,7 +228,10 @@ class Url {
|
|||
* that are known not to be handled by the Drupal routing system (such as
|
||||
* static files), use base: for the scheme to get a link relative to the
|
||||
* Drupal base path (like the <base> HTML element). For a link to an entity
|
||||
* you may use entity:{entity_type}/{entity_id} URIs.
|
||||
* you may use entity:{entity_type}/{entity_id} URIs. The internal: scheme
|
||||
* should be avoided except when processing actual user input that may or
|
||||
* may not correspond to a Drupal route. Normally use Url::fromRoute() for
|
||||
* code linking to any any Drupal page.
|
||||
* @param array $options
|
||||
* (optional) An associative array of additional URL options, with the
|
||||
* following elements:
|
||||
|
@ -265,6 +242,9 @@ class Url {
|
|||
* - 'absolute': Defaults to FALSE. Whether to force the output to be an
|
||||
* absolute link (beginning with http:). Useful for links that will be
|
||||
* displayed outside the site, such as in an RSS feed.
|
||||
* - 'attributes': An associative array of HTML attributes that will be
|
||||
* added to the anchor tag if you use the \Drupal\Core\Link class to make
|
||||
* the link.
|
||||
* - 'language': An optional language object used to look up the alias
|
||||
* for the URL. If $options['language'] is omitted, it defaults to the
|
||||
* current language for the language type LanguageInterface::TYPE_URL.
|
||||
|
@ -272,14 +252,9 @@ class Url {
|
|||
* defined, the current scheme is used, so the user stays on HTTP or HTTPS
|
||||
* respectively. TRUE enforces HTTPS and FALSE enforces HTTP.
|
||||
*
|
||||
* Note: the internal: scheme should be avoided except when processing actual
|
||||
* user input that may or may not correspond to a Drupal route. Normally use
|
||||
* Url::fromRoute() for code linking to any any Drupal page.
|
||||
*
|
||||
* You can call access() on the returned object to do access checking.
|
||||
*
|
||||
* @return \Drupal\Core\Url
|
||||
* A new Url object with properties depending on the URI scheme.
|
||||
* A new Url object with properties depending on the URI scheme. Call the
|
||||
* access() method on this to do access checking.
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* Thrown when the passed in path has no scheme.
|
||||
|
@ -348,7 +323,7 @@ class Url {
|
|||
* Parts from an URI of the form entity:{entity_type}/{entity_id} as from
|
||||
* parse_url().
|
||||
* @param array $options
|
||||
* An array of options, see static::fromUri() for details.
|
||||
* An array of options, see \Drupal\Core\Url::fromUri() for details.
|
||||
* @param string $uri
|
||||
* The original entered URI.
|
||||
*
|
||||
|
@ -400,7 +375,7 @@ class Url {
|
|||
* @param array $uri_parts
|
||||
* Parts from an URI of the form internal:{path} as from parse_url().
|
||||
* @param array $options
|
||||
* An array of options, see static::fromUri() for details.
|
||||
* An array of options, see \Drupal\Core\Url::fromUri() for details.
|
||||
*
|
||||
* @return \Drupal\Core\Url
|
||||
* A new Url object for a 'internal:' URI.
|
||||
|
@ -447,7 +422,7 @@ class Url {
|
|||
* from parse_url(), where the path is the route name optionally followed by
|
||||
* a ";" followed by route parameters in key=value format with & separators.
|
||||
* @param array $options
|
||||
* An array of options, see static::fromUri() for details.
|
||||
* An array of options, see \Drupal\Core\Url::fromUri() for details.
|
||||
* @param string $uri
|
||||
* The original passed in URI.
|
||||
*
|
||||
|
@ -638,6 +613,8 @@ class Url {
|
|||
* Returns the URL options.
|
||||
*
|
||||
* @return array
|
||||
* The array of options. See \Drupal\Core\Url::fromUri() for details on what
|
||||
* it contains.
|
||||
*/
|
||||
public function getOptions() {
|
||||
return $this->options;
|
||||
|
@ -646,6 +623,8 @@ class Url {
|
|||
/**
|
||||
* Gets a specific option.
|
||||
*
|
||||
* See \Drupal\Core\Url::fromUri() for details on the options.
|
||||
*
|
||||
* @param string $name
|
||||
* The name of the option.
|
||||
*
|
||||
|
@ -664,7 +643,8 @@ class Url {
|
|||
* Sets the URL options.
|
||||
*
|
||||
* @param array $options
|
||||
* The array of options.
|
||||
* The array of options. See \Drupal\Core\Url::fromUri() for details on what
|
||||
* it contains.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -676,6 +656,8 @@ class Url {
|
|||
/**
|
||||
* Sets a specific option.
|
||||
*
|
||||
* See \Drupal\Core\Url::fromUri() for details on the options.
|
||||
*
|
||||
* @param string $name
|
||||
* The name of the option.
|
||||
* @param mixed $value
|
||||
|
|
Reference in a new issue