Update core 8.3.0
This commit is contained in:
parent
da7a7918f8
commit
cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
|
@ -80,7 +80,7 @@ function entity_get_bundles($entity_type = NULL) {
|
|||
function entity_load($entity_type, $id, $reset = FALSE) {
|
||||
$controller = \Drupal::entityManager()->getStorage($entity_type);
|
||||
if ($reset) {
|
||||
$controller->resetCache(array($id));
|
||||
$controller->resetCache([$id]);
|
||||
}
|
||||
return $controller->load($id);
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ function entity_delete_multiple($entity_type, array $ids) {
|
|||
* @see \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage()
|
||||
* @see \Drupal\Core\Entity\EntityStorageInterface::create()
|
||||
*/
|
||||
function entity_create($entity_type, array $values = array()) {
|
||||
function entity_create($entity_type, array $values = []) {
|
||||
return \Drupal::entityManager()
|
||||
->getStorage($entity_type)
|
||||
->create($values);
|
||||
|
@ -483,12 +483,12 @@ function entity_get_display($entity_type, $bundle, $view_mode) {
|
|||
// configuration entries are only created when a display object is explicitly
|
||||
// configured and saved.
|
||||
if (!$display) {
|
||||
$display = EntityViewDisplay::create(array(
|
||||
$display = EntityViewDisplay::create([
|
||||
'targetEntityType' => $entity_type,
|
||||
'bundle' => $bundle,
|
||||
'mode' => $view_mode,
|
||||
'status' => TRUE,
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
return $display;
|
||||
|
@ -514,7 +514,7 @@ function entity_get_display($entity_type, $bundle, $view_mode) {
|
|||
* 'weight' => 1,
|
||||
* ))
|
||||
* ->setComponent('field_image', array(
|
||||
* 'type' => 'hidden',
|
||||
* 'region' => 'hidden',
|
||||
* ))
|
||||
* ->save();
|
||||
* @endcode
|
||||
|
@ -563,12 +563,12 @@ function entity_get_form_display($entity_type, $bundle, $form_mode) {
|
|||
// configuration entries are only created when an entity form display is
|
||||
// explicitly configured and saved.
|
||||
if (!$entity_form_display) {
|
||||
$entity_form_display = EntityFormDisplay::create(array(
|
||||
$entity_form_display = EntityFormDisplay::create([
|
||||
'targetEntityType' => $entity_type,
|
||||
'bundle' => $bundle,
|
||||
'mode' => $form_mode,
|
||||
'status' => TRUE,
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
return $entity_form_display;
|
||||
|
|
Reference in a new issue