public function setItems($items, $where = '')
    {
        if (empty($items)) {
            return;
        }
        if (empty($where)) {
            $this->putItems($items);
        } elseif ($where === 'last') {
            $this->_items = ArrayHelper::insertLast($this->_items, $items);
        } elseif ($where === 'first') {
            $this->_items = ArrayHelper::insertFirst($this->_items, $items);
        } else {
            $this->_items = ArrayHelper::insertInside($this->_items, $items, $where);
        }
    }
public function setItems($items, $where = '')
    {
        if (empty($items)) {
            return;
        }
        if (empty($where)) {
            $this->putItems($items);
        } elseif ($where === 'last') {
            $this->_items = ArrayHelper::insertLast($this->_items, $items);
        } elseif ($where === 'first') {
            $this->_items = ArrayHelper::insertFirst($this->_items, $items);
        } else {
            $this->_items = ArrayHelper::insertInside($this->_items, $items, $where);
        }
    }
public function setItems ( $ items , $ where = '' ) { if ( empty ( $ items ) ) { return ; } if ( empty ( $ where ) ) { $ this -> putItems ( $ items ) ; } elseif ( $ where === 'last' ) { $ this -> _items = ArrayHelper :: insertLast ( $ this -> _items , $ items ) ; } elseif ( $ where === 'first' ) { $ this -> _items = ArrayHelper :: insertFirst ( $ this -> _items , $ items ) ; } else { $ this -> _items = ArrayHelper :: insertInside ( $ this -> _items , $ items , $ where ) ; } }
Adds items to specified place.
@param array $items list of items
@param mixed $where
@see setItem()
Adds items to specified place .