当前位置: 首页>>代码示例>>PHP>>正文


PHP PhpRenderer::url方法代码示例

本文整理汇总了PHP中Zend\View\Renderer\PhpRenderer::url方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpRenderer::url方法的具体用法?PHP PhpRenderer::url怎么用?PHP PhpRenderer::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\View\Renderer\PhpRenderer的用法示例。


在下文中一共展示了PhpRenderer::url方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getItems

 /**
  * @see \Auth\Dependency\ListInterface::getItems()
  */
 public function getItems(User $user, View $view, $limit)
 {
     $items = [];
     foreach ($this->repository->getUserOrganizations($user->getId(), $limit) as $organization) {
         $name = $organization->getOrganizationName();
         $title = $name ? $name->getName() : '**** DRAFT ****';
         $url = $view->url('lang/organizations/edit', ['id' => $organization->getId()]);
         $items[] = new ListItem($title, $url);
     }
     return $items;
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:14,代码来源:ListListener.php

示例2: getItems

 /**
  * @see \Auth\Dependency\ListInterface::getItems()
  */
 public function getItems(User $user, View $view, $limit)
 {
     $items = [];
     foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) {
         $title = $application->getJob()->getTitle();
         $title .= ' (' . $view->dateFormat($application->getDateCreated()) . ')';
         $url = $view->url('lang/applications/detail', ['id' => $application->getId()]);
         $items[] = new ListItem($title, $url);
     }
     return $items;
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:14,代码来源:ListListener.php

示例3: getItems

 /**
  * @see \Auth\Dependency\ListInterface::getItems()
  */
 public function getItems(User $user, View $view, $limit)
 {
     $items = [];
     foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) {
         $title = $job->getTitle() ?: $view->translate('untitled');
         $title .= ' (' . $view->dateFormat($job->getDateCreated(), 'short', 'none') . ')';
         $url = $view->url('lang/jobs/manage', ['action' => 'edit'], ['query' => ['id' => $job->getId()]]);
         $items[] = new ListItem($title, $url);
     }
     return $items;
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:14,代码来源:ListListener.php

示例4: render

 public function render(PhpRenderer $view, SitePageBlockRepresentation $block)
 {
     parse_str($this->getData($block->data(), 'query'), $query);
     $previewQuery = $query;
     $previewQuery['limit'] = 10;
     $previewQuery['site_id'] = $block->page()->site()->id();
     $response = $this->getServiceLocator()->get('Omeka\\ApiManager')->search('items', $previewQuery);
     $preview = '<ul>';
     foreach ($response->getContent() as $item) {
         $preview .= '<li>' . $item->displayTitle() . '</li>';
     }
     $preview .= '</ul>';
     $link = $view->hyperlink('browse this', $view->url('site/resource', ['controller' => 'item'], ['query' => $query], true));
     return $preview . $link;
 }
开发者ID:patrova,项目名称:omeka-s,代码行数:15,代码来源:BrowsePreview.php


注:本文中的Zend\View\Renderer\PhpRenderer::url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。