protected $label;
/**
* {@inheritdoc}
*/
public function postSave(EntityStorageInterface
$storage,
$update = TRUE
) { parent::
postSave($storage,
$update);
if (!
$update && !
$this->
isSyncing()) { // Save a new shortcut set with links copied from the user's default set.
$default_set =
shortcut_default_set();
// This is the default set, do not copy shortcuts.
if ($default_set->
id() !=
$this->
id()) { foreach ($default_set->
getShortcuts() as $shortcut) { $shortcut =
$shortcut->
createDuplicate();
$shortcut->
enforceIsNew();
$shortcut->shortcut_set->target_id =
$this->
id();
$shortcut->
save();
} } } }