refactored loadMaterials vuex mixins with graphql
This commit is contained in:
@@ -76,20 +76,20 @@ class MaterioFlagController extends ControllerBase {
|
||||
// 'name' => $item->getName(),
|
||||
// 'connected_entity_id' => $item->getConnectedEntityId(),
|
||||
// );
|
||||
$items[] = $item->getConnectedEntityId();
|
||||
}
|
||||
$items_uuids = [];
|
||||
foreach ($items as $nid) {
|
||||
$node = $this->entityTypeManager->getStorage('node')->load($nid);
|
||||
$items_uuids[] = $node->uuid();
|
||||
$items[] = (int)$item->getConnectedEntityId();
|
||||
}
|
||||
// $items_uuids = [];
|
||||
// foreach ($items as $nid) {
|
||||
// $node = $this->entityTypeManager->getStorage('node')->load($nid);
|
||||
// $items_uuids[] = $node->uuid();
|
||||
// }
|
||||
|
||||
$data[$collection->id()] = array(
|
||||
"id" => $collection->id(),
|
||||
"name" => $collection->getName(),
|
||||
"flag_id" => $flag_id,
|
||||
"items" => $items,
|
||||
"items_uuids" => $items_uuids,
|
||||
"items" => $items
|
||||
// "items_uuids" => $items_uuids
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user