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