update sort
This commit is contained in:
parent
76647dded7
commit
763acc4fd0
@ -34,8 +34,8 @@ public static function create(ContainerInterface $container) {
|
||||
public function getRecentFights() {
|
||||
$query = $this->entityTypeManager->getStorage('node')->getQuery();
|
||||
$query->accessCheck(TRUE);
|
||||
$query->condition('type', 'fight')->sort('created', 'DESC');
|
||||
$query->range(0, 14);
|
||||
$query->condition('type', 'fight')->sort('created', 'DESC')->sort('nid', 'DESC');
|
||||
$query->range(0, 13);
|
||||
$nids = $query->execute();
|
||||
$all_fights = Node::loadMultiple($nids);
|
||||
$fights = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user