コード例 #1
0
 /**
  * action show
  *
  * @param Term $term
  * @param integer $pageUid
  * @return void
  */
 public function showAction(Term $term, $pageUid = NULL)
 {
     $pageUid = FALSE === empty($pageUid) ? $pageUid : FALSE;
     if ('pagination' === $this->settings['listmode']) {
         $this->view->assign('paginateLink', PaginateController::paginationArguments($term->getName(), $this->settings['pagination']['characters']));
     }
     $this->view->assign('pageUid', $pageUid);
     $this->view->assign('listPage', $this->settings['listPage']);
     $this->view->assign('term', $term);
 }
コード例 #2
0
 /**
  * @test
  */
 public function paginateArgumentsTest()
 {
     $this->assertEquals(array('@widget_0' => array('character' => 'T')), PaginateController::paginationArguments('Test', $this->characters));
     $this->assertEquals(array('@widget_0' => array('character' => 'A')), PaginateController::paginationArguments('Ätest', $this->characters));
     //Use characters plus umlauts
     $characters = $this->characters . ',Ä,Ö,Ü';
     $this->assertEquals(array('@widget_0' => array('character' => 'AE')), PaginateController::paginationArguments('Ätest', $characters));
     $this->assertEquals(array('@widget_0' => array('character' => 'OE')), PaginateController::paginationArguments('Ötest', $characters));
     $this->assertEquals(array('@widget_0' => array('character' => 'UE')), PaginateController::paginationArguments('Ütest', $characters));
 }