Update to Drupal 8.0.5. For more information, see https://www.drupal.org/node/2679347
This commit is contained in:
parent
2a9f1f148d
commit
fd3b12cf27
251 changed files with 5439 additions and 957 deletions
|
@ -139,7 +139,7 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Con
|
|||
$values[$this->langcodeKey] = $langcode;
|
||||
$values[$this->getEntityType()->getKey('default_langcode')] = FALSE;
|
||||
$this->initFieldValues($translation, $values, $field_names);
|
||||
$this->invokeHook('translation_create', $entity);
|
||||
$this->invokeHook('translation_create', $translation);
|
||||
return $translation;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,6 +309,9 @@ interface EntityInterface extends AccessibleInterface, CacheableDependencyInterf
|
|||
* The entity storage object.
|
||||
*
|
||||
* @see \Drupal\Core\Field\FieldItemListInterface::preSave()
|
||||
*
|
||||
* @throws \Exception
|
||||
* When there is a problem that should prevent saving the entity.
|
||||
*/
|
||||
public function preSave(EntityStorageInterface $storage);
|
||||
|
||||
|
|
|
@ -177,25 +177,20 @@ class EntityTypeManager extends DefaultPluginManager implements EntityTypeManage
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFormObject($entity_type, $operation) {
|
||||
if (!isset($this->handlers['form'][$operation][$entity_type])) {
|
||||
if (!$class = $this->getDefinition($entity_type, TRUE)->getFormClass($operation)) {
|
||||
throw new InvalidPluginDefinitionException($entity_type, sprintf('The "%s" entity type did not specify a "%s" form class.', $entity_type, $operation));
|
||||
}
|
||||
|
||||
$form_object = $this->classResolver->getInstanceFromDefinition($class);
|
||||
|
||||
$form_object
|
||||
->setStringTranslation($this->stringTranslation)
|
||||
->setModuleHandler($this->moduleHandler)
|
||||
->setEntityTypeManager($this)
|
||||
->setOperation($operation)
|
||||
// The entity manager cannot be injected due to a circular dependency.
|
||||
// @todo Remove this set call in https://www.drupal.org/node/2603542.
|
||||
->setEntityManager(\Drupal::entityManager());
|
||||
$this->handlers['form'][$operation][$entity_type] = $form_object;
|
||||
if (!$class = $this->getDefinition($entity_type, TRUE)->getFormClass($operation)) {
|
||||
throw new InvalidPluginDefinitionException($entity_type, sprintf('The "%s" entity type did not specify a "%s" form class.', $entity_type, $operation));
|
||||
}
|
||||
|
||||
return $this->handlers['form'][$operation][$entity_type];
|
||||
$form_object = $this->classResolver->getInstanceFromDefinition($class);
|
||||
|
||||
return $form_object
|
||||
->setStringTranslation($this->stringTranslation)
|
||||
->setModuleHandler($this->moduleHandler)
|
||||
->setEntityTypeManager($this)
|
||||
->setOperation($operation)
|
||||
// The entity manager cannot be injected due to a circular dependency.
|
||||
// @todo Remove this set call in https://www.drupal.org/node/2603542.
|
||||
->setEntityManager(\Drupal::entityManager());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -699,7 +699,6 @@ function hook_entity_type_alter(array &$entity_types) {
|
|||
*
|
||||
* @see \Drupal\Core\Entity\EntityManagerInterface::getAllViewModes()
|
||||
* @see \Drupal\Core\Entity\EntityManagerInterface::getViewModes()
|
||||
* @see hook_entity_view_mode_info()
|
||||
*/
|
||||
function hook_entity_view_mode_info_alter(&$view_modes) {
|
||||
$view_modes['user']['full']['status'] = TRUE;
|
||||
|
|
Reference in a new issue