Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6

This commit is contained in:
Pantheon Automation 2017-02-02 16:28:38 -08:00 committed by Greg Anderson
parent db56c09587
commit f1e72395cb
588 changed files with 26857 additions and 2777 deletions

View file

@ -15,6 +15,8 @@ use Symfony\Component\DomCrawler\Field\FormField;
/**
* This is an internal class that must not be used directly.
*
* @internal
*/
class FormFieldRegistry
{
@ -26,8 +28,6 @@ class FormFieldRegistry
* Adds a field to the registry.
*
* @param FormField $field The field
*
* @throws \InvalidArgumentException when the name is malformed
*/
public function add(FormField $field)
{
@ -52,8 +52,6 @@ class FormFieldRegistry
* Removes a field and its children from the registry.
*
* @param string $name The fully qualified name of the base field
*
* @throws \InvalidArgumentException when the name is malformed
*/
public function remove($name)
{
@ -76,7 +74,6 @@ class FormFieldRegistry
*
* @return mixed The value of the field
*
* @throws \InvalidArgumentException when the name is malformed
* @throws \InvalidArgumentException if the field does not exist
*/
public function &get($name)
@ -118,7 +115,6 @@ class FormFieldRegistry
* @param string $name The fully qualified name of the field
* @param mixed $value The value
*
* @throws \InvalidArgumentException when the name is malformed
* @throws \InvalidArgumentException if the field does not exist
*/
public function set($name, $value)
@ -155,7 +151,7 @@ class FormFieldRegistry
* @param string $base The fully qualified name of the base field
* @param array $values The values of the fields
*
* @return FormFieldRegistry
* @return static
*/
private static function create($base, array $values)
{
@ -199,24 +195,23 @@ class FormFieldRegistry
* @param string $name The name of the field
*
* @return string[] The list of segments
*
* @throws \InvalidArgumentException when the name is malformed
*/
private function getSegments($name)
{
if (preg_match('/^(?P<base>[^[]+)(?P<extra>(\[.*)|$)/', $name, $m)) {
$segments = array($m['base']);
while (!empty($m['extra'])) {
if (preg_match('/^\[(?P<segment>.*?)\](?P<extra>.*)$/', $m['extra'], $m)) {
$extra = $m['extra'];
if (preg_match('/^\[(?P<segment>.*?)\](?P<extra>.*)$/', $extra, $m)) {
$segments[] = $m['segment'];
} else {
throw new \InvalidArgumentException(sprintf('Malformed field path "%s"', $name));
$segments[] = $extra;
}
}
return $segments;
}
throw new \InvalidArgumentException(sprintf('Malformed field path "%s"', $name));
return array($name);
}
}