public function prepare(DataRequest $dataRequest, $paginationUrl, $numberOfEntries, $numberOfEntriesPerPage = 10)
    {
        $this->paginationUrl = $paginationUrl;
        $neededPages = ceil($numberOfEntries / $numberOfEntriesPerPage);
        $activePage = $dataRequest->getPage();

        $pagination = new PaginationObject();
        
        if ($activePage > 1) {
            // Add the first page button
            $button = new Button('&laquo;', $this->buildUrl(1));
            $pagination->addEntry($button); 
            
            
            // Add the prev page button
            $button = new Button('&lsaquo;', $this->buildUrl(($activePage - 1)));
            $pagination->addEntry($button);
        }
        
        $this->addPages($pagination, $activePage, $neededPages);
        
        if ($activePage < $neededPages) {
            // Add the next page button
            $button = new Button('&rsaquo;', $this->buildUrl(($activePage + 1)));
            $pagination->addEntry($button);
            
            // Add the last page button
            $button = new Button('&raquo;', $this->buildUrl($neededPages));
            $pagination->addEntry($button);
        }
        
        return $pagination;
    }