Maps data from database to item values.

@return \Netgen\BlockManager\Persistence\Values\Collection\Item[]
964930
public function mapItems(array $data): array
    {
        $items = [];

        foreach ($data as $dataItem) {
            $items[] = Item::fromArray(
                [
                    'id' => (int) $dataItem['id'],
                    'collectionId' => (int) $dataItem['collection_id'],
                    'position' => (int) $dataItem['position'],
                    'value' => $dataItem['value'],
                    'valueType' => $dataItem['value_type'],
                    'status' => (int) $dataItem['status'],
                    'config' => $this->buildParameters((string) $dataItem['config']),
                ]
            );
        }

        return $items;
    }
55294
public function getValues()
    {
        $values = [];
        foreach ($this->findScenario() as $name) {
            $values[$name] = $this->$name;
        }
        return $values;
    }
579521
public function toArrayWithoutEmptyValues()
    {
        $array = $this->removeEmptyValues($this->toArray(true));
        foreach ($array as $key => $value) {
            if ($value === \Parable\ORM\Database::NULL_VALUE) {
                $array[$key] = null;
            }
        }
        return $array;
    }
1352047
public function getItems()
    {
        $items = [];
        if (isset($this->cart->items) === true) {
            foreach ($this->cart->items as $item) {
                $items[$item->getHash()] = $item;
            }
        }

        return $items;
    }
1048864
protected function getAllKeyValues() {
    $keys = [];
    // add temporary permission to allow to read entitys
    $this->isLoadingKeys = true;
    $permissionManager = ObjectFactory::getInstance('permissionManager');
    $tmpPerm = $permissionManager->addTempPermission($this->entityType, '', PersistenceAction::READ);
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    $objects = $persistenceFacade->loadObjects($this->entityType, BuildDepth::SINGLE);
    $permissionManager->removeTempPermission($tmpPerm);
    $this->isLoadingKeys = false;
    foreach ($objects as $object) {
      $key = ActionKey::createKey(
              $object->getValue($this->valueMap['resource']),
              $object->getValue($this->valueMap['context']),
              $object->getValue($this->valueMap['action'])
            );
      $keys[$key] = $object->getValue($this->valueMap['value']);
    }
    return $keys;
  }
614683
public function toArray()
    {
        $items = array();
        foreach ($this->items as $key => $item) {
            if (is_numeric($item)) {
                $item = DataObject::get_by_id($this->dataClass, $item);
            }
            if (!empty($this->extraFields[$key])) {
                $item->update($this->extraFields[$key]);
            }
            $items[] = $item;
        }
        return $items;
    }
1293051
public function values()
    {
        $result = [];
        foreach ($this->collection() as $param) {
            $result = $result + $param->values();
        }

        return $result;
    }
939682
public function getItems()
    {
        if (count($this->items) > $this->itemsPerPage) {
            $items = [];
            $counter = 0;
            foreach ($this->items as $key => $value) {
                $items[$key] = $value;
                $counter++;
                if ($counter == $this->itemsPerPage) {
                    return $items;
                }
            }
        }

        return $this->items;
    }
60344
public function toArray()
    {
        $this->init();
        $values = [];
        foreach (array_keys($this->structureMetadata->getProperties()) as $childName) {
            $values[$childName] = $this->normalize($this->getProperty($childName)->getValue());
        }

        return $values;
    }
1308705
protected function _getItemsData()
    {
        $items = [];

        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $productCollection = $this->getLayer()->getProductCollection();
        $optionsFacetedData = $productCollection->getFacetedData('categories');

        $currentCategory = $this->dataProvider->getCategory();
        $categories = $this->getChildrenCategories();

        if ($currentCategory->getIsActive()) {
            foreach ($categories as $category) {
                if (isset($optionsFacetedData[(int) $category->getId()])) {
                    $productCount = $optionsFacetedData[$category->getId()]['count'];
                    if ($category->getIsActive() && $productCount > 0) {
                        $item = [
                            'label' => $this->escaper->escapeHtml($category->getName()),
                            'value' => $category->getId(),
                            'count' => $optionsFacetedData[$category->getId()]['count'],
                            'url'   => $category->getUrl(),
                        ];

                        $items[] = $item;
                    }
                }
            }
        }

        return $items;
    }
70647
public function getItems()
    {
        foreach ($this->_items as $name => $item) {
            $this->getItem($name);
        }

        return $this->_items;
    }
760348
public function getListItems()
    {
        $item_arr = [];
        foreach ($this->items as $item)
        {
            $item_arr[$item->id] = $item->title;
        }
        return $item_arr;
    }
424028
public function getItems()
    {
        if ($this->_items !== null) {
            return $this->_items;
        }
        
        $data = [];
        foreach ($this->getModules() as $node) {
            foreach (ArrayHelper::getValue($this->getModuleItems($node['id']), 'groups', []) as $groupValue) {
                foreach ($groupValue['items'] as $array) {
                    $array['module'] = $node;
                    $data[] = $array;
                }
            }
        }

        $this->_items = $data;
        
        return $data;
    }
186581
public function getItems()
    {
        $statement = (null !== $this->c && null !== $this->d) ? $this->getStatementDay() : $this->getStatementPagination();
        $result = $statement->execute((is_array($this->select)) ? $this->select[1] : null);
        $resultSet = clone $this->resultSetPrototype;

        $this->result = $resultSet->initialize($result);

        return $this->result;
    }
387134
public function getItems()
    {
        $items = new ArrayList();

        // If the value has been set, use that
        if ($this->value != 'unchanged') {
            $sourceObject = $this->getSourceObject();
            if (is_array($sourceObject)) {
                $values = is_array($this->value) ? $this->value : preg_split('/ *, */', trim($this->value));

                foreach ($values as $value) {
                    $item = new stdClass;
                    $item->ID = $value;
                    $item->Title = $sourceObject[$value];
                    $items->push($item);
                }
                return $items;
            }

            // Otherwise, look data up from the linked relation
            if (is_string($this->value)) {
                $ids = explode(',', $this->value);
                foreach ($ids as $id) {
                    if (!is_numeric($id)) {
                        continue;
                    }
                    $item = DataObject::get_by_id($sourceObject, $id);
                    if ($item) {
                        $items->push($item);
                    }
                }
                return $items;
            }
        }

        if ($this->form) {
            $fieldName = $this->name;
            $record = $this->form->getRecord();
            if (is_object($record) && $record->hasMethod($fieldName)) {
                return $record->$fieldName();
            }
        }

        return $items;
    }
1022325
public static function getAllValues(): array
	{
		$enumerables = self::getCache();
		$result = [];

		foreach ($enumerables as $enumerable => $value) {
			$result[] = $value;
		}

		return $result;
	}
459786
public function mapItem(PersistenceItem $item): Item
    {
        try {
            $itemDefinition = $this->itemDefinitionRegistry->getItemDefinition($item->valueType);
        } catch (ItemDefinitionException $e) {
            $itemDefinition = new NullItemDefinition($item->valueType);
        }

        $itemData = [
            'id' => $item->id,
            'status' => $item->status,
            'definition' => $itemDefinition,
            'collectionId' => $item->collectionId,
            'position' => $item->position,
            'value' => $item->value,
            'configs' => iterator_to_array(
                $this->configMapper->mapConfig(
                    $item->config,
                    $itemDefinition->getConfigDefinitions()
                )
            ),
            'cmsItem' => function () use ($item, $itemDefinition): CmsItemInterface {
                $valueType = $itemDefinition instanceof NullItemDefinition ? 'null' : $itemDefinition->getValueType();

                return $this->cmsItemLoader->load($item->value, $valueType);
            },
        ];

        return Item::fromArray($itemData);
    }