Sets custom item elements.

@param string[] $customElements

@return Feed
978520
public function setCustomElements(array $customElements)
    {
        $this->customElements = array();

        foreach ($customElements as $element) {
            $this->addCustomElement($element);
        }

        return $this;
    }
1142261
public function setChannelElementsFromArray(array $elementArray)
    {
        foreach ($elementArray as $elementName => $content) {
            $this->setChannelElement($elementName, $content);
        }

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

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

        return $this;
    }
768296
public function setItems($items)
    {
        foreach ($this->items as $item) {
            $item->setOrder(null);
        }
        foreach ($items as $item) {
            $item->setOrder($this);
        }
        $this->items = $items;
        return $this;
    }
94872
public function setSelectors($selectors)
    {
        $this->selectors = [];
        if (!is_array($selectors)) {
            $selectors = [$selectors];
        }
        foreach ($selectors as $selector) {
            $this->addSelector($selector);
        }

        return $this;
    }
413828
public function addItem(Item $feedItem)
    {
        if ($feedItem->getVersion() != $this->version)
        {
            $msg = sprintf('Feed type mismatch: This instance can handle %s feeds only, but item for %s feeds given.', $this->version, $feedItem->getVersion());
            throw new \InvalidArgumentException($msg);
        }

        $this->items[] = $feedItem;

        return $this;
    }
719545
public function addPackElement(PackElement $packElements)
    {
        $this->packElements[] = $packElements;
        $packElements->setProductPack($this);

        return $this;
    }
165412
public function withElement(ElementInterface ...$elements): CollectionElement
    {
        array_walk(
            $elements,
            function (ElementInterface $element) {
                $this->elements[$element->name()] = $element;
            }
        );

        return $this;
    }
700871
public function setListItemElement(string $element): Breadcrumbs
    {
        $this->validateElement('allowedListItemElement', $element);

        $this->setOption('listItemElement', $element);

        return $this;
    }
238285
public function setItems($items)
    {
        if (! is_array($items)) {
            $items = func_get_args();
        }

        $this->addBody($items);

        return $this;
    }
155637
public function addElement(OrderElement $elements)
    {
        $this->elements[] = $elements;
        $elements->setOrder($this);

        return $this;
    }
26615
public function addCustomFields($customFields)
    {
        if (!$this->getCustomFields()) {
            return $this->setCustomFields(array($customFields));
        } else {
            return $this->setCustomFields(
                array_merge($this->getCustomFields(), array($customFields))
            );
        }
    }
329898
public static Set<ModuleElement>
            modulesIn(Set<? extends Element> elements) {
        return setFilter(elements, MODULE_KIND, ModuleElement.class);
    }
1373340
public function setElement($element = null)
    {
        $this->element = null;

        if (!$element = $this->internalResolveElement($element)) {
            $this->element = $this->elementId = null;
        } else {
            /** @var Element $element */
            $this->elementId = $element->id;
            $this->element = $element;
        }

        return $this;
    }
935664
public function add(...$elements) : self
    {
        foreach ($elements as $element) {
            $this->elements[] = $element;
        }

        return $this;
    }
1359510
private function updateElements(AbstractClassContent $content, array $elementsData)
    {
        if ($content instanceof ContentSet) {
            $elements = $this->prepareElements($elementsData, false);
            $page = $this->isMainZone($content);
            $this->updateContentSetElements($content, $elements, $page);
        } else {
            $elements = $this->prepareElements($elementsData);
            $this->updateContentElements($content, $elements);
        }

        return $this;
    }
1072279
private function removeElements( $elements ) {
		$list = $elements;
		if ( $elements instanceof \DOMNodeList ) {
			$list = [];
			foreach ( $elements as $element ) {
				$list[] = $element;
			}
		}
		/** @var $element \DOMElement */
		foreach ( $list as $element ) {
			if ( $element->parentNode ) {
				$element->parentNode->removeChild( $element );
			}
		}
		return $list;
	}