|
@@ -45,11 +45,13 @@ class ComputedShowroomsReferences extends EntityReferenceFieldItemList
|
|
|
|
|
|
$tids = $query->execute();
|
|
|
shuffle($tids);
|
|
|
- foreach ($tids as $key => $tid) {
|
|
|
+ $i=0;
|
|
|
+ foreach ($tids as $tid) {
|
|
|
$term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load($tid);
|
|
|
$sid = WorkflowManager::getCurrentStateId($term, 'field_workflow');
|
|
|
if($sid != 'workflow_visible') continue;
|
|
|
- $this->list[$key] = $this->createItem($key, $tid);
|
|
|
+ $this->list[$i] = $this->createItem($i, $tid);
|
|
|
+ $i++;
|
|
|
}
|
|
|
}
|
|
|
|