File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 88use Drupal\user\Entity\User;
99use Drupal\user\RoleInterface;
1010use Drupal\user\UserInterface;
11+ use Drupal\shortcut\Entity\Shortcut;
1112
1213/**
1314 * Implements hook_install().
@@ -48,15 +49,15 @@ function demo_commerce_install() {
4849 user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access shortcuts']);
4950
5051 // Populate the default shortcut set.
51- $shortcut = entity_create('shortcut', [
52+ $shortcut = Shortcut::create( [
5253 'shortcut_set' => 'default',
5354 'title' => t('Add content'),
5455 'weight' => -20,
5556 'link' => ['uri' => 'internal:/node/add'],
5657 ]);
5758 $shortcut->save();
5859
59- $shortcut = entity_create('shortcut', [
60+ $shortcut = Shortcut::create( [
6061 'shortcut_set' => 'default',
6162 'title' => t('All content'),
6263 'weight' => -19,
You can’t perform that action at this time.
0 commit comments