Prepare an array of product SKU items
@param array $list
@return array
976057
protected function prepareList(array $list)
    {
        foreach ($list as &$item) {
            $item['fields'] = $this->getFieldValues($item['combination_id']);
        }

        return $list;
    }
927289
public function fromArray( array $list )
	{
		$unknown = array();
		$list = parent::fromArray( $list );

		foreach( $list as $key => $value )
		{
			switch( $key )
			{
				case 'order.base.address.baseid': $this->setBaseId( $value ); break;
				case 'order.base.address.addressid': $this->setAddressId( $value ); break;
				case 'order.base.address.type': $this->setType( $value ); break;
				default: $unknown[$key] = $value;
			}
		}

		return $unknown;
	}
285133
public static function getPlugins(array $list = [])
    {
        $plugins = [];

        if (!empty($list)) {
            foreach ($list as $plug) {
                if (class_exists($plug['class'])) {
                    $plugins[] = json_decode($plug['class']::getInfo());
                }
            }
        }

        return $plugins;
    }
850820
protected function prepareListCart(array &$items)
    {
        foreach ($items as &$item) {
            $this->setItemUrlEntity($item, $this->store, 'product');
        }
    }
1213484
protected function preparePagesBlog(array &$list)
    {
        foreach ($list as &$item) {

            list($teaser, $body) = $this->explodeText($item['description']);

            if ($body !== '') {
                $item['teaser'] = strip_tags($teaser);
            }

            $this->setItemEntityUrl($item, array('entity' => 'page'));
        }
    }
1316072
public function formatMobile(array $list)
    {
        return implode(',', array_unique(array_map(function ($value) {
            return is_array($value) ? "{$value['number']}" : $value;
        }, $list)));
    }
340577
public static function mixedToMongoIdList(array $list)
    {
        return array_map(function ($element) {
            // MongoId
            if ($element instanceof \MongoId) {
                return $element;
            }

            // \Sokil\Mongo\Document
            if ($element instanceof Document) {
                return $element->getId();
            }

            // array with id key
            if (is_array($element)) {
                if (!isset($element['_id'])) {
                    throw new \InvalidArgumentException('Array must have _id key');
                }
                return $element['_id'];
            }

            // string
            if (is_string($element)) {
                try {
                    return new \MongoId($element);
                } catch (\MongoException $e) {
                    return $element;
                }
            }

            // int
            if (is_int($element)) {
                return $element;
            }

            throw new \InvalidArgumentException(
                'Must be \MongoId, \Sokil\Mongo\Document, array with _id key, string or integer'
            );
        }, array_values($list));
    }
240816
function itemList( $asObject = true )
    {
        return eZPersistentObject::fetchObjectList( eZProductCollectionItem::definition(),
                                                    null, array( "productcollection_id" => $this->ID ),
                                                    null,
                                                    null,
                                                    $asObject );
    }
737740
public function listToMap(array $list)
    {
        $map = array();
        for ($i = 0, $n = count($list); $i < $n; $i += 2) {
            $map[$list[$i]] = $list[$i + 1];
        }
        return (object)$map;
    }
898723
private function formatListForApi(array $list)
    {
        $values = [];

        foreach ($list as $value) {
            $values[] = $this->formatValueForApi($value);
        }

        return ['values' => $values];
    }
15804
private function getOptions(array $list)
    {
        // To be returned
        $elements = array();

        foreach ($list as $value => $text) {
            array_push($elements, $this->createOptionNode($value, $text));
        }

        return $elements;
    }
475214
protected function prepareComponents(array &$order)
    {
        if (!empty($order['cart']['items'])) {
            foreach ($order['cart']['items'] as $sku => $item) {
                $price = isset($item['total']) ? $item['total'] : null;
                $order['data']['components']['cart']['items'][$sku]['price'] = $price;
            }
        }
    }
1021178
protected function prepareListModule(array &$list)
    {
        foreach ($list as &$item) {
            $item['has_dependencies'] = !empty($item['requires']) || !empty($item['required_by']);
        }
    }
240803
protected static function prepareWhere(array $array, $list)
    {
        if (!is_array($list)) {
            $list = [$list];
        }
        foreach ($list as $v) {
            if (array_key_exists($v, $array)) {
                return $v;
            }
        }

        return null;
    }
333980
protected function _prepareIconList(array &$iconList) {
		if (empty($iconList) || !is_array($iconList)) {
			return;
		}

		foreach ($iconList as $i => &$iconListItem) {
			if (is_array($iconListItem) && isAssoc($iconListItem)) {
				foreach ($iconListItem as $topMenu => $subMenu) {
					$subMenuList = '';
					foreach ($subMenu as $subMenuItem) {
						$subMenuClass = null;
						if ($subMenuItem === 'divider') {
							$subMenuItem = '';
							$subMenuClass = 'divider';
						}
						$subMenuList .= $this->Html->tag('li', $subMenuItem, ['class' => $subMenuClass]);
					}
					$topMenuItem = $topMenu . $this->Html->tag('ul', $subMenuList, ['class' => 'dropdown-menu']);
				}
				$iconListItem = $topMenuItem;
			}
		}
	}
1024599
private function adjustUriSegments($list, $item)
    {
        if ($item === '..') {
            array_pop($list);
            return $list;
        }
        array_push($list, $item);

        return $list;
    }
1217285
public function mset(array $list)
    {
        return $this->getFactory()->getRedisClient()->mset(
            $this->getFactory()->createListConverter()->convertToList($list)
        );
    }