diff --git a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php index e71c6213cb..c06ca01e22 100644 --- a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php +++ b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php @@ -42,6 +42,7 @@ protected function getWeight(EntityInterface $entity) { protected function setWeight(EntityInterface $entity, $weight) { /* @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */ $entity->set($this->weightKey, $weight); + return $entity; } } diff --git a/core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php b/core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php index c73087446f..2aa9658e9d 100644 --- a/core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php +++ b/core/lib/Drupal/Core/Entity/DraggableListBuilderTrait.php @@ -55,6 +55,8 @@ abstract protected function getWeight(EntityInterface $entity); * The entity whose weight will be set. * @param int $weight * The weight to set on the entity. + * + * @return $this */ abstract protected function setWeight(EntityInterface $entity, $weight);