/**
  * Initialize the pagination, search and order of the table
  * @param zibo\library\html\table\ExtendedTable $table
  * @param int $page The current page
  * @param int $rowsPerPage Number or rows to display on each page
  * @param string $orderMethod Name of the order method to use
  * @param string $orderDirection Name of the order direction
  * @param string $searchQuery Value for the search query
  * @return null
  */
 protected function initializeTable(ExtendedTable $table, $page, $rowsPerPage, $orderMethod, $orderDirection, $searchQuery)
 {
     if (!$this->isReadOnly && $this->isDeleteAllowed) {
         $translator = $this->getTranslator();
         $table->addAction($translator->translate(self::TRANSLATION_DELETE), array($this, 'deleteAction'), $translator->translate(self::TRANSLATION_DELETE_CONFIRM));
     }
     if ($this->pagination) {
         $table->setPaginationOptions($this->pagination);
         $table->setRowsPerPage($rowsPerPage);
         $table->setPage($page);
     }
     if ($table->hasOrderMethods()) {
         if ($orderMethod) {
             $table->setOrderMethod($orderMethod);
         }
         if ($orderDirection) {
             $table->setOrderDirection($orderDirection);
         }
     }
     if ($table->hasSearch()) {
         $table->setSearchQuery($searchQuery);
     }
 }