You are here

public function Shortcut::getWeight in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/shortcut/src/Entity/Shortcut.php \Drupal\shortcut\Entity\Shortcut::getWeight()

Returns the weight among shortcuts with the same depth.

Return value

int The shortcut weight.

Overrides ShortcutInterface::getWeight

File

core/modules/shortcut/src/Entity/Shortcut.php, line 75
Contains \Drupal\shortcut\Entity\Shortcut.

Class

Shortcut
Defines the shortcut entity class.

Namespace

Drupal\shortcut\Entity

Code

public function getWeight() {
  return $this
    ->get('weight')->value;
}