示例#1
0
 function __invoke($categoryName, $bookName, $bookId, $options = null)
 {
     $filter = new CreateLinkFriendly();
     $categoryName = $filter->filter($categoryName);
     $bookName = $filter->filter($bookName);
     return $this->view->url("bookShop", array("category" => $categoryName, "name" => $bookName, "id" => $bookId));
 }
示例#2
0
 function __invoke($listBreadcumb)
 {
     $linkHome = $this->view->url('homeShop');
     $xhtml = '<a href="' . $linkHome . '">Home</a>&nbsp&nbsp&raquo&nbsp&nbsp';
     $total = count($listBreadcumb);
     $i = 1;
     $filter = new CreateLinkFriendly();
     if (!empty($listBreadcumb)) {
         foreach ($listBreadcumb as $breadcrumb) {
             $linkCategory = $this->view->url("categoryShop", array("name" => $filter->filter($breadcrumb->name), "id" => $breadcrumb->id));
             if ($i == $total) {
                 $xhtml .= sprintf('<a href="#" class="last">%s</a>', $breadcrumb->name);
             } else {
                 $xhtml .= sprintf('<a href="%s">%s</a>&nbsp&nbsp&raquo&nbsp&nbsp', $linkCategory, $breadcrumb->name);
             }
             $i++;
         }
     }
     return $xhtml;
 }
示例#3
0
 function __invoke($name, $id, $options = null)
 {
     $filter = new CreateLinkFriendly();
     $name = $filter->filter($name);
     return $this->view->url("categoryShop/filter", array("name" => $name, "id" => $id, 'page' => $options['page'], 'limit' => $options['limit'], 'order' => $options['order'], 'dir' => $options['dir'], 'display' => $options['display']));
 }