function ShortcutInterface::setWeight

Same name in other branches
  1. 9 core/modules/shortcut/src/ShortcutInterface.php \Drupal\shortcut\ShortcutInterface::setWeight()
  2. 8.9.x core/modules/shortcut/src/ShortcutInterface.php \Drupal\shortcut\ShortcutInterface::setWeight()
  3. 10 core/modules/shortcut/src/ShortcutInterface.php \Drupal\shortcut\ShortcutInterface::setWeight()

Sets the weight among shortcuts with the same depth.

Parameters

int $weight: The shortcut weight.

Return value

$this The called shortcut entity.

1 method overrides ShortcutInterface::setWeight()
Shortcut::setWeight in core/modules/shortcut/src/Entity/Shortcut.php
Sets the weight among shortcuts with the same depth.

File

core/modules/shortcut/src/ShortcutInterface.php, line 48

Class

ShortcutInterface
Provides an interface defining a shortcut entity.

Namespace

Drupal\shortcut

Code

public function setWeight($weight);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.