@param MasteryTreeItemDto[] $masteryTreeItems

@return $this
493549
public function setMasteryTreeItems($masteryTreeItems)
    {
        foreach ($masteryTreeItems as $key => $dtoData) {
            $this->masteryTreeItems[$key] = new MasteryTreeItemDto($dtoData);
        }
    
        return $this;
    }
73788
public function setEntries($entries)
    {
        foreach ($entries as $key => $dtoData) {
            $this->entries[$key] = new LeagueItemDto($dtoData);
        }
    
        return $this;
    }
1134959
private function setTotalItems($totalItems)
    {
        if (! is_int($totalItems)) {
            throw new Exceptions\InvalidIntegerType(gettype($totalItems));
        }

        // A result may have zero or more items
        if ($totalItems < 0) {
            throw new Exceptions\PositiveIntegerRequired($totalItems);
        }

        $this->totalItems = $totalItems;

        $this->changedTotalItems();
    }
219022
private function addItem()
    {
        $args = func_get_args();
        $this->items[$args[0]] = implode(':', array_slice($args, 1));

        return $this;
    }
166435
public function clearCache($tTags): self
    {
        $tTags = (array)$tTags;
        $this->oCache->deleteItemsByTags($tTags);

        return $this;
    }
684331
public function setItems(array $items)
    {
        if (is_array($items)) {
            $i = array();
            foreach ($items as $key => $item) {
                if ($item instanceof PagSeguroItem) {
                    $i[$key] = $item;
                } else {
                    if (is_array($item)) {
                        $i[$key] = new PagSeguroItem($item);
                    }
                }
            }
            $this->items = $i;
        }
    }
261416
public function withItem($data, $transformer, $resourceKey = null, $meta = [], array $headers = [])
    {
        $resource = new Item($data, $transformer, $resourceKey);

        foreach ($meta as $metaKey => $metaValue) {
            $resource->setMetaValue($metaKey, $metaValue);
        }

        $rootScope = $this->manager->createData($resource);

        return $this->withArray($rootScope->toArray(), $headers);
    }
1292136
public function replace(array $items): parent {
        $ac = new ArrayCover($this->_data);
        $this->_data = $ac($items);
        return $this;
    }
172957
public function removeItems( $items ) {
		foreach ( $items as $item ) {
			$index = array_search( $item, $this->items, true );
			if ( $index !== false ) {
				$item->setElementGroup( null );
				array_splice( $this->items, $index, 1 );
			}
		}

		// Update actual target element contents to reflect our list
		$this->group->clearContent();
		$this->group->appendContent( $this->items );

		return $this;
	}
221594
public function setItems(array $items)
    {
        $this->content = new HtmlElements();

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

        return $this;
    }
1156178
public function setMasteryValue($masteryValue)
    {
        if ((is_bool($masteryValue) && $masteryValue === false) || is_float($masteryValue) || is_double($masteryValue)) {
            $this->masteryValue = $masteryValue;
        } else {
            $msg = "The masteryValue argument must be a floating point value or false, '" . gettype($masteryValue) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1351607
public function setItems($items)
    {
        foreach ($items as $key => $dtoData) {
            $this->items[$key] = new BlockItemDto($dtoData);
        }
    
        return $this;
    }
1369445
public function setItems($items, $relocateOrphans = false)
    {
        // Order is kept from the function input, provider must order them
        // correctly prior to us, weight should not matter to this algorithm.

        // Please note, and this is very important, that it is mandatory to
        // register first all children, because they are supposed to be sorted
        // by weight first, then parent, the second foreach will deal with
        // parenting, but this one will ensure all parents are visible for the
        // second!
        foreach ($items as $item) {
            if (!$item instanceof TreeItem) {
                throw new \InvalidArgumentException("items must be instances of \MakinaCorpus\Umenu\TreeItem");
            }

            $this->children[$item->getId()] = $item;
        }

        foreach ($this->children as $item) {
            $parentId = $item->getParentId();
            $itemId = $item->getId();

            if (!$parentId) {
                $this->topLevel[] = $item;
            } else if (!isset($this->children[$parentId])) {
                if ($relocateOrphans) {
                    $this->topLevel[] = $item;
                } else {
                    // Item is orphan and we don't relocate orphan, we must
                    // exclude this item from tree
                    unset($this->children[$itemId]);
                    continue;
                }
            } else {
                // Build the tree by adding the child to its parent, this is
                // allowed because both this class and the TreeItem class are
                // extending the TreeBase class, and properties are protected.
                $this->children[$parentId]->children[$itemId] = $item;
            }

            // And we need to be able to fetch those per node too.
            $nodeId = $item->getNodeId();
            if ($nodeId) {
                $this->perNode[$nodeId][$itemId] = $item;
            }
        }
    }
797695
public function setItems($items)
    {
        foreach ($items as $item) {
            $item->setGallery($this);
        }
        $this->items = $items;

        return $this;
    }
1244556
protected function createCollectionResourceForItems($items, $from, $to, $count)
    {
        $resource = parent::get();
        $resource->items = $items;
        $resource->count = $count;
        $resource->range = new \stdClass();
        $resource->range->from = $from;
        $resource->range->to = $to;

        return $resource;
    }
799129
protected function createNavItems(array $treeItems, NavItem $parent = null)
    {
        /** @var NavItem[] $navItems */
        $navItems = [];

        foreach ($treeItems as $treeItem) {
            if ($treeItem->isAsset) {
                continue;
            }

            $nav = $this->createNavItem($treeItem, $parent);
            if ($nav === null) {
                continue;
            }

            if (!isset($navItems[$nav->relUrl]) || !$navItems[$nav->relUrl]->children) {
                $navItems[$nav->relUrl] = $nav;
            }
        }

        return array_values($navItems);
    }
413549
public function setMessages(Mage_Core_Model_Message_Collection $messages) {
        if ($this->_fixMessages()) {
            $this->_saveMessages($messages->getItems());
        } else {
            parent::setMessages($messages);
        }
        return $this;
    }