Create the model collection from the internal models in the action collection.

@param array $actions The actions collection.
@param array $items   Write-back clipboard items.

@return DefaultCollection
435640
private function createModelCollectionFromActions(array $actions, array &$items)
    {
        $models = new DefaultCollection();
        foreach ($actions as $action) {
            $models->push($action['model']);
            $items[] = $action['item'];
        }

        return $models;
    }
1016770
public function fromItems(array $items): array
    {
        $objects = [];
        foreach ($items as $item) {
            $objects[] = $this->fromItem($item);
        }

        return $objects;
    }
1087005
public function pushAll(array $items) : Vector
    {
        $values = $this->_pushAll($items);
        $this->setValues($values);
        return $this;
    }
525988
public function append($items)
    {
        return new ResultScan(array_merge($this->buffered()->toArray(), $this->parseItems($items)));
    }
797695
public function setItems($items)
    {
        foreach ($items as $item) {
            $item->setGallery($this);
        }
        $this->items = $items;

        return $this;
    }
228466
public function add($items)
    {
        if (is_array($items)) {
            $this->collection[] = new Delta($items);
        } elseif (is_object($items) && $items instanceof Delta) {
            $this->collection[] = $items;
        }

        return $this;
    }
1188136
public function items($items)
    {
        if ($items instanceof Closure) {
            $items = $items();
        }

        array_map(array($this, 'item'), (array) $items);

        return $this;
    }
608691
protected function processItems(array $items)
    {
        $processedItems = [];

        foreach ($items as $entry) {
            if (isset($entry['metadata']) && is_array($entry['metadata'])) {
                $processedItems[] = new SearchResult($entry);
            }
        }

        $this->items = new ModelCollection($processedItems);
    }
287237
public static function fromArray(array $items) : Collection
	{
		$obj = new static($items);
		foreach ($items as $key => $item) {
			$obj->__set($key, $item);
		}
		return $obj;
	}
420345
public static function sequence(...$items){
        $cmd = [];
        foreach ($items as $item) {
            $cmd[] = ($item instanceof static)?$item->getShellCommand():$item;
        }
        return new static(implode(' && ',$cmd));
    }
497361
public function setItems($items)
    {
        $this->items = array();

        foreach ($items as $item) {
            $this->addItem($item);
        }

        return $this;
    }
293227
protected function _setActions($actions)
    {
        return (new Collection($actions))->map(function ($value) {
            $options = (array)$value->get('options') + ['class' => ['btn btn-default']];
            $value->set('options', $options);

            return $value;
        })->toArray();
    }
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
159634
public function hydrate(array $items)
    {
        $instance = $this->model->newInstance();

        return $instance->newCollection(array_map(function ($item) use ($instance) {
            return $instance->newFromBuilder($item);
        }, $items));
    }
461606
public function addContentItems($items = [])
    {
        // Loop on each item.
        collect($items)->each(function ($item) {
            // Add each content to the Container.
            $this->addSingleContentItem($item);
        });

        // Return object.
        return $this;
    }
1004126
public function add($items)
    {
        if (is_array($items)) {
            $this->collection[] = new Record($items);
        } elseif (is_object($items) && $items instanceof Record) {
            $this->collection[] = $items;
        }

        return $this;
    }
385736
public function addManagedCollections($collections)
    {
        if (!is_array($collections)) {
            $collections = array($collections);
        }
        $this->managedCollections = array_merge($this->managedCollections, $collections);

        return $this;
    }