Set the tracks for a music group

@param array $items
@return array
439567
protected function setTrackAttribute($items)
    {
        if ( ! is_array($items))
        {
            return $items;
        }

        return array_map(function ($item) {
            return $this->getNestedContext(MusicRecording::class, $item);
        }, $items);
    }
652779
public function setItems(array $items)
    {
        $this->items = $items;
        $this->names = array_keys($items);

        return $this;
    }
591148
protected function setAuthorAttribute($items)
    {
        if (is_array($items) === false) {
            return $items;
        }

        return array_map(function ($item) {
            return $this->getNestedContext(Person::class, $item);
        }, $items);
    }
468839
public function prepare($items = null)
    {
        $items->each(function ($item) {
            $item->items = collect();
            if ($item->has_categories) {
                $item->items = $this->prepare(ProjectCategories::allForMenu($item->page->uri()));
            }
            $item->href = $this->setHref($item);
            $item->class = $this->setClass($item);
        });

        return $items;
    }
547923
public static function parameters(array $items)
    {
        $parameters = array();
        $items = array_filter(Arr::flatten($items));

        foreach ($items as $item) {
            $itemParams = $item->getParameters();

            if ($itemParams !== null) {
                $parameters []= $itemParams;
            }
        }

        return Arr::flatten($parameters);
    }
170223
public function replace(array $items = [])
    {
        $this->items = [];

        foreach ($items as $key => $item) {
            $this->set($key, $item);
        }
    }
797695
public function setItems($items)
    {
        foreach ($items as $item) {
            $item->setGallery($this);
        }
        $this->items = $items;

        return $this;
    }
287237
public static function fromArray(array $items) : Collection
	{
		$obj = new static($items);
		foreach ($items as $key => $item) {
			$obj->__set($key, $item);
		}
		return $obj;
	}
1246598
public function remove(... $items) : Set
    {
        $values = $this->_removeSameAll($items);
        $this->setValues($values);
        return $this;
    }
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;
    }
611468
public function updateMany(array $items)
    {
        $ids    = array_pluck($items, $this->model->getKeyName());
        $models = $this->model->find($ids);

        foreach ($models as $model) {
            $attributes = array_first($items, function ($i, $attributes) use ($model) {
                if (!array_key_exists($model->getKeyName(), $attributes)) {
                    return false;
                }

                return $attributes[$model->getKeyName()] == $model->getKey();
            });

            $this->validation()->validate('update', array_merge($attributes, [$model->getKeyName() => $model->getKey()]));

            $model->fill($attributes);
            $model->save();
        }

        return $models;
    }
987899
protected function setInAlbumAttribute($items)
    {
        if ( ! is_array($items))
        {
            return $items;
        }

        //Check if not multidimensional array (for backward compatibility)
        if((count($items) == count($items, COUNT_RECURSIVE)))
        {
            return $this->getNestedContext(MusicAlbum::class, $items);
        }

        //multiple albums
        return array_map(function ($item) {
            return $this->getNestedContext(MusicAlbum::class, $item);
        }, $items);
    }
751520
public function setItems(array $items)
    {
        $this->feedManager->get($this->name)->addFromArray($items);

        return $this;
    }
857445
public function replace(array $items): self {
        foreach ($items as $key => $value) {
            $this->has($key) && $this->set($key, $value);
        }
        return $this;
    }
255448
protected function getArrayableItems($items)
	{
		if ($items instanceof Collection)
		{
			$items = $items->all();
		}
		elseif ($items instanceof Arrayable)
		{
			$items = $items->toArray();
		}

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

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

		return $list;
	}
151853
public function setItems($items)
    {
        if ($items && !$items instanceof ItemBag) {
            $items = new MulticardsItemBag($items);
        }

        return $this->setParameter('items', $items);
    }