You are here

public function Link::getWeight in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Entity/Link.php \Drupal\colossal_menu\Entity\Link::getWeight()

Returns the weight of the menu link.

Return value

int The weight of the menu link, 0 by default.

Overrides MenuLinkInterface::getWeight

File

src/Entity/Link.php, line 327

Class

Link
Defines the Link entity.

Namespace

Drupal\colossal_menu\Entity

Code

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