Shortcut::setWeight

public Shortcut::setWeight($weight)

Sets the weight among shortcuts with the same depth.

Parameters

int $weight: The shortcut weight.

Return value

\Drupal\shortcut\ShortcutInterface The called shortcut entity.

Overrides ShortcutInterface::setWeight

File

core/modules/shortcut/src/Entity/Shortcut.php, line 77

Class

Shortcut
Defines the shortcut entity class.

Namespace

Drupal\shortcut\Entity

Code

public function setWeight($weight) {
  $this->set('weight', $weight);
  return $this;
}
doc_Drupal
2016-10-29 09:42:26
Comments
Leave a Comment

Please login to continue.