public function prepend($entity)
    {
        $collection = $this->getNewCollection();
        $collection->append($entity);
        foreach ($this as $entity) {
            $collection->append($entity);
        }
        $this->clear();
        $this->append($collection);
        return $this;
    }
public function prepend($entity)
    {
        $collection = $this->getNewCollection();
        $collection->append($entity);
        foreach ($this as $entity) {
            $collection->append($entity);
        }
        $this->clear();
        $this->append($collection);
        return $this;
    }
public function prepend ( $ entity ) { $ collection = $ this -> getNewCollection ( ) ; $ collection -> append ( $ entity ) ; foreach ( $ this as $ entity ) { $ collection -> append ( $ entity ) ; } $ this -> clear ( ) ; $ this -> append ( $ collection ) ; return $ this ; }
Prepand entity to the begining of collection

@param Entity $entity

@return static
Prepand entity to the begining of collection