本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}