/** * @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; }
/** * @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; }