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

1
2
3
4
public function setWeight($weight) {
  $this->set('weight', $weight);
  return $this;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.