function DraggableListBuilderTrait::getWeight

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php \Drupal\Core\Entity\DraggableListBuilderTrait::getWeight()

Gets the weight of the given entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to get the weight for.

Return value

int|float The weight of the entity.

2 calls to DraggableListBuilderTrait::getWeight()
DraggableListBuilderTrait::buildRow in core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php
Builds a row for an entity in the entity listing.
DraggableListBuilderTrait::submitForm in core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php
Form submission handler.
1 method overrides DraggableListBuilderTrait::getWeight()
DraggableListBuilder::getWeight in core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
Gets the weight of the given entity.

File

core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php, line 52

Class

DraggableListBuilderTrait
Provides a trait for draggable listings of entities.

Namespace

Drupal\Core\Entity

Code

protected abstract function getWeight(EntityInterface $entity) : int|float;

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