diff --git a/core/lib/Drupal/Core/Entity/EntityBCDecorator.php b/core/lib/Drupal/Core/Entity/EntityBCDecorator.php index 31fb456..e34531d 100644 --- a/core/lib/Drupal/Core/Entity/EntityBCDecorator.php +++ b/core/lib/Drupal/Core/Entity/EntityBCDecorator.php @@ -219,6 +219,9 @@ public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User * Forwards the call to the decorated entity. */ public function get($property_name) { + if (!isset($this->definitions[$property_name])) { + return $this->__get($property_name); + } return $this->decorated->get($property_name); } @@ -226,6 +229,9 @@ public function get($property_name) { * Forwards the call to the decorated entity. */ public function set($property_name, $value) { + if (!isset($this->definitions[$property_name])) { + return $this->__set($property_name, $value); + } return $this->decorated->set($property_name, $value); } diff --git a/core/lib/Drupal/Core/Entity/EntityFormControllerBC.php b/core/lib/Drupal/Core/Entity/EntityFormControllerBC.php deleted file mode 100644 index efad954..0000000 --- a/core/lib/Drupal/Core/Entity/EntityFormControllerBC.php +++ /dev/null @@ -1,65 +0,0 @@ -getBCEntity() : $entity; - } - - /** - * Overrides EntityFormControllerNG::buildEntity(). - */ - public function buildEntity(array $form, array &$form_state) { - $entity = clone $this->getEntity($form_state); - $entity_type = $entity->entityType(); - $info = entity_get_info($entity_type); - // @todo Exploit the Field API to process the submitted entity fields. - - // Copy top-level form values that are entity fields but not handled by - // field API without changing existing entity fields that are not being - // edited by this form. Values of fields handled by field API are copied - // by field_attach_extract_form_values() below. - $values_excluding_fields = $info['fieldable'] ? array_diff_key($form_state['values'], field_info_instances($entity_type, $entity->bundle())) : $form_state['values']; - $translation = $entity->getTranslation($this->getFormLangcode($form_state), FALSE); - $definitions = $translation->getPropertyDefinitions(); - foreach ($values_excluding_fields as $key => $value) { - if (isset($definitions[$key])) { - $translation->$key = $value; - } - elseif ($entity instanceof EntityBCDecorator) { - // Handle yet undefined properties. - // @todo Remove once EntityBCDecorator is removed. - $entity->$key = $value; - } - } - - // Invoke all specified builders for copying form values to entity fields. - if (isset($form['#entity_builders'])) { - foreach ($form['#entity_builders'] as $function) { - call_user_func_array($function, array($entity_type, $entity, &$form, &$form_state)); - } - } - - // Invoke field API for copying field values. - if ($info['fieldable']) { - field_attach_extract_form_values($entity->getBCEntity(), $form, $form_state); - } - return $entity->getBCEntity(); - } -} diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index 85be9f5..63b4189 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -10,12 +10,12 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityFormControllerBC; +use Drupal\Core\Entity\EntityFormController; /** * Form controller for the node edit forms. */ -class NodeFormController extends EntityFormControllerBC { +class NodeFormController extends EntityFormController { /** * Prepares the node object. @@ -470,4 +470,5 @@ public function delete(array $form, array &$form_state) { $node = $this->getEntity($form_state); $form_state['redirect'] = array('node/' . $node->nid . '/delete', array('query' => $destination)); } + } diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 9e8b097..7b2f86c 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -947,6 +947,9 @@ protected function curlInitialize() { $curl_options[CURLOPT_HTTPAUTH] = $this->httpauth_method; $curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials; } + + $curl_options[CURLOPT_COOKIE] = 'XDEBUG_SESSION=DRUPAL_TESTING;'; + // curl_setopt_array() returns FALSE if any of the specified options // cannot be set, and stops processing any further options. $result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options);