@param array $items

@return array
550643
public function filter(array $items): array
    {
        if (isset($items[$this->keyToUnset])) {
            unset($items[$this->keyToUnset]);
        }

        return $items;
    }
692659
protected function hydrateLineItems($items)
    {
        $result = array();
        if ($items == null) {
            return $result;
        }

        foreach ($items as $i => $item) {
            $result = array_merge(
                $result,
                array(
                    'Item_Name_'     . $i => $item->name,
                    'Item_Desc_'     . $i => $item->description,
                    'Item_Price_'    . $i => $this->formatAmount($item->amount),
                    'Item_Quantity_' . $i => $item->quantity,
                    'Item_SKU_'      . $i => $item->number,
                )
            );
        }

        return $result;
    }
480447
public function getTickets($items)
  {
    if (!count($items)) {
      return [];
    }

    $result = [];
    foreach ($items as $item) {
      $result[] = new Ticket($item);
    }

    return $result;
  }
741254
protected function renderItems( array $items )
    {
        $renderedItems = [ ];
        foreach ($items as $index => $item) {
            $renderedItems[] = $this->renderItem( $item );
        }

        return implode( PHP_EOL, $renderedItems );
    }
1075264
public function searchIn(array $items = [])
    {
        if (\is_null($slug = $this->slug)) {
            return \array_search($this->value, $items);
        }

        return \array_search($slug, $items);
    }
757110
protected function getArrayableItems($items)
		{
			if ($items instanceof self) {
				$items = $items->all();
			} elseif ($items instanceof Arrayable) {
				$items = $items->toArray();
			}

			return $items;
		}
691990
public function createMany(array $items)
    {
        $models = collection();

        foreach ($items as $item) {
            $models[] = $this->create($item);
        }

        return $models;
    }
440475
public static function menuToRules($items)
    {
        $rules = [];
        foreach ($items as $item) {
            $url = ArrayHelper::getValue($item, 'url');
            $urlRule = ArrayHelper::getValue($item, 'urlRule');

            if ($url && $urlRule && is_array($url)) {
                $defaults = $url;
                $route = array_shift($defaults);

                if (is_string($urlRule)) {
                    $rules[] = [
                        'pattern' => Yii::getAlias($urlRule),
                        'route' => $route,
                    ];
                } elseif (is_array($urlRule)) {
                    if (!isset($urlRule['route'])) {
                        $urlRule['route'] = $route;
                    }
                    $rules[] = $urlRule;
                }
            }

            $subItems = ArrayHelper::getValue($item, 'items');
            if (is_array($subItems)) {
                $rules = array_merge(static::menuToRules($subItems), $rules);
            }
        }
        return $rules;
    }
652779
public function setItems(array $items)
    {
        $this->items = $items;
        $this->names = array_keys($items);

        return $this;
    }
830778
public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->setImage($item);
        }

        return $items;
    }
76901
public function addToArray($items = [])
    {
        if (!is_array($items)) {
            $items = [$items];
        }

        foreach ($items as $item) {
            $this->toArray[] = $item;
        }

        return $this;
    }
147051
protected function getArrayableItems($items)
    {
        if (is_array($items)) {
            return $items;
        }
        if ($items instanceof self) {
            return $items->all();
        }
        if (is_object($items) && method_exists($items, 'toArray')) {
            return $items->toArray();
        }
        if (is_object($items) && method_exists($items, 'toJson')) {
            return json_decode($items->toJson(), true);
        }
        if ($items instanceof JsonSerializable) {
            return $items->jsonSerialize();
        }
        if ($items instanceof Traversable) {
            return iterator_to_array($items);
        }

        return (array) $items;
    }
990029
protected function map( array $items )
	{
		$list = [];

		foreach( $items as $item ) {
			$list[$item->getCode()] = $item;
		}

		return $list;
	}
1345725
public function setItems(array $items)
    {
        $cont = 0;
        $fItems = [];
        foreach ($items as $item) {
            $cont++;

            $fItems = array_merge($fItems, [
              'itemId'.$cont          => $this->sanitize($item, 'itemId'),
              'itemDescription'.$cont => $this->sanitize($item, 'itemDescription'),
              'itemAmount'.$cont      => $this->sanitizeMoney($item, 'itemAmount'),
              'itemQuantity'.$cont    => $this->sanitizeNumber($item, 'itemQuantity'),
            ]);
        }

        $this->itemsCount = $cont;
        $this->validateItems($fItems);
        $this->items = $fItems;

        return $this;
    }
64893
private function parseArrayToCatalogFieldEntities(array $items)
    {
        $entities = [];
        foreach ($items as $elementType => $catalogItems) {
            $entities = array_merge($entities, $this->parseArrayToFieldEntities($catalogItems, $elementType));
        }
        return $entities;
    }
270341
public static function indexBy($items, $key)
    {
        $array = array();

        foreach ($items as $item) {
            $array[self::getValue($item, $key)] = $item;
        }

        return $array;
    }
105291
public function rawItems(array $items)
    {
        foreach ($items as $uri => $title) {
            list($title, $uri, $liAttr) = $this->fixData($uri, $title);
            $this->rawItem($title, $uri, $liAttr);
        }
        return $this;
    }