Commit 32207411 authored by catch's avatar catch

Issue #2641616 by Mac_Weber: Replace deprecated usage of ...

Issue #2641616 by Mac_Weber: Replace deprecated usage of  entity_create('shortcut') with a direct call to Shortcut::create()
parent d3886091
......@@ -6,6 +6,7 @@
use Drupal\user\Entity\User;
use Drupal\user\RoleInterface;
use Drupal\shortcut\Entity\Shortcut;
/**
* Implements hook_install().
......@@ -43,7 +44,7 @@ function standard_install() {
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, array('access shortcuts'));
// Populate the default shortcut set.
$shortcut = entity_create('shortcut', array(
$shortcut = Shortcut::create(array(
'shortcut_set' => 'default',
'title' => t('Add content'),
'weight' => -20,
......@@ -51,7 +52,7 @@ function standard_install() {
));
$shortcut->save();
$shortcut = entity_create('shortcut', array(
$shortcut = Shortcut::create(array(
'shortcut_set' => 'default',
'title' => t('All content'),
'weight' => -19,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment