better home computed reference field
This commit is contained in:
parent
68a7084deb
commit
7ce31674ea
|
@ -38,6 +38,7 @@ class ComputedArticlesReferences extends EntityReferenceFieldItemList
|
|||
$query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->sort('created', 'DESC')
|
||||
->exists('field_visuel')
|
||||
->range(0,6)
|
||||
->condition('type', 'article');
|
||||
$nids = $query->execute();
|
||||
|
|
|
@ -40,6 +40,8 @@ class ComputedMaterialsReferences extends EntityReferenceFieldItemList
|
|||
$query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->condition('type', 'materiau')
|
||||
->exists('field_materiau_images')
|
||||
->condition('field_materiau_images.%delta', 3)
|
||||
->sort('created', 'DESC')
|
||||
->range(0,200);
|
||||
$results = $query->execute();
|
||||
|
|
Loading…
Reference in New Issue