19declare(strict_types=1);
46 return match ($view) {
49 PresentationGUI::class
51 self::VIEW_POSTING => [
53 PresentationGUI::class,
54 \ilBlogPostingGUI::class
61 return match ($view) {
62 self::VIEW_MAIN =>
"preview",
63 self::VIEW_POSTING =>
"previewFullscreen",
74 $this->
ctrl->setParameterByClass($class, $par, $value);
79 return $this->
ctrl->getLinkTargetByClass(
80 $this->getPathForView($view),
81 $this->getCmdForView($view)
85 public function forMonth(
string $month): string
87 $this->setParameter(self::VIEW_MAIN, self::PAR_MONTH, $month);
88 $this->setParameter(self::VIEW_MAIN, self::PAR_POSTING,
"");
89 return $this->getLinkForView(self::VIEW_MAIN);
92 public function forPosting(
int $posting_id,
string $month =
""): string
94 $this->setParameter(self::VIEW_POSTING, self::PAR_MONTH, $month);
95 $this->setParameter(self::VIEW_POSTING, self::PAR_POSTING, (
string) $posting_id);
96 return $this->getLinkForView(self::VIEW_POSTING);
101 $this->setParameter(self::VIEW_MAIN, self::PAR_KEYWORD, urlencode($keyword));
102 $this->setParameter(self::VIEW_MAIN, self::PAR_POSTING,
"");
103 $link = $this->getLinkForView(self::VIEW_MAIN);
104 $this->setParameter(self::VIEW_MAIN, self::PAR_KEYWORD,
"");
110 $this->setParameter(self::VIEW_MAIN, self::PAR_AUTHOR, (
string)
$user_id);
111 $this->setParameter(self::VIEW_MAIN, self::PAR_POSTING,
"");
112 $link = $this->getLinkForView(self::VIEW_MAIN);
113 $this->setParameter(self::VIEW_MAIN, self::PAR_AUTHOR,
"");
119 $this->setParameter(self::VIEW_MAIN, self::PAR_MONTH,
"");
120 $this->setParameter(self::VIEW_MAIN, self::PAR_POSTING,
"");
121 return $this->getLinkForView(self::VIEW_MAIN);
Standard link builder using ilCtrl for web view.
forMonth(string $month)
Get link to a monthly list of postings.
forPosting(int $posting_id, string $month="")
Get link to a specific blog posting.
forMainList()
Get link to the main list (starting page).
const string VIEW_POSTING
__construct(protected \ilCtrl $ctrl)
forKeyword(string $keyword)
Get link to a list of postings filtered by keyword.
setParameter(string $view, string $par, string $value)
getCmdForView(string $view)
getLinkForView(string $view)
forAuthor(int $user_id)
Get link to a list of postings filtered by author.
getPathForView(string $view)
@ilCtrl_Calls ILIAS\Blog\Presentation\PresentationGUI: ilBlogPostingGUI
Class ilCtrl provides processing control methods.
Interface for building links within the Blog component.