19 declare(strict_types=1);
    33     protected \ILIAS\Blog\Presentation\Util 
$util;
    57         $this->blog_access = $blog_acces;
    58         $this->
ctrl = $ctrl = $this->gui->ctrl();
    59         $this->items = $a_items;
    60         $this->current_month = $month;
    64         $cmd = 
"previewFullscreen";
    66         if ($single_posting) {  
    68             if ($next_posting > 0) {
    77             if ($prev_posting > 0) {
    84             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"blpg", $blog_page);
    90             if ($next_month !== 
"") {
    99             if ($prev_month !== 
"") {
   105             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"bmn", $month);
   113         $lng = $this->domain->lng();
   114         $toolbar = $this->gui->toolbar();
   115         $f = $this->gui->ui()->factory();
   118         if ($this->blog_access->mayContribute()) {
   121             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"bmn", 
"");
   122             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"blpg", 
"");
   123             $link = $ctrl->getLinkTargetByClass(\ilObjBlogGUI::class, 
"");
   124             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"blpg", $this->blog_page);
   125             $ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"bmn", $this->current_month);
   126             $actions[] = 
$f->button()->shy(
   127                 $lng->txt(
"blog_edit"),
   132         if ($single_posting && $this->blog_access->mayContribute() && $this->blog_access->mayEditPosting($this->blog_page)) {
   133             $ctrl->setParameterByClass(\ilBlogPostingGUI::class, 
"blpg", $this->blog_page);
   134             $link = $ctrl->getLinkTargetByClass(\ilBlogPostingGUI::class, 
"edit");
   135             $actions[] = 
$f->button()->shy(
   136                 $lng->txt(
"blog_edit_posting"),
   140         if (count($actions) > 0) {
   141             $toolbar->addStickyItem(
$f->dropdown()->standard($actions));
   148         $month = current($this->items);
   149         if (is_array($month)) {
   150             return (
int) current($month)[
"id"];
   161         foreach ($this->items as $month => $items) {
   162             foreach ($items as $item) {
   163                 if ($item[
"id"] == $blog_page) {
   167                     $next_blpg = (
int) $item[
"id"];
   180         foreach ($this->items as $month => $items) {
   181             foreach ($items as $item) {
   182                 if ($found && $prev_blpg === 0) {
   183                     $prev_blpg = (
int) $item[
"id"];
   195         $this->
ctrl->setParameterByClass(\ilBlogPostingGUI::class, 
"blpg", (
string) $posting);
   196         return $this->
ctrl->getLinkTargetByClass(\ilBlogPostingGUI::class, $cmd);
   201         $this->
ctrl->setParameterByClass(\ilObjBlogGUI::class, 
"bmn", $month);
   202         return $this->
ctrl->getLinkTargetByClass(\ilObjBlogGUI::class, 
"preview");
   207         $toolbar = $this->gui->toolbar();
   208         $f = $this->gui->ui()->factory();
   210         foreach ($this->items as $month => $items) {
   211             $label = $this->util->getMonthPresentation($month);
   212             if ($month === $this->current_month) {
   213                 $label = 
"» " . $label;
   215             $m[] = 
$f->link()->standard(
   221             $toolbar->addStickyItem(
$f->dropdown()->standard($m)->withLabel(
   222                 $this->
getDropdownLabel($this->util->getMonthPresentation($this->current_month))
   232         foreach ($this->items as $month => $items) {
   245         foreach ($this->items as $month => $items) {
   259         return key($this->items);
   274         $toolbar = $this->gui->toolbar();
   275         $b = $this->gui->ui()->factory()->button()->standard(
   276             "<span class=\"glyphicon glyphicon-chevron-" . $dir . 
" \" aria-hidden=\"true\"></span>",
   280             $b = 
$b->withUnavailableAction();
   282         $toolbar->addStickyItem(
$b);
   287         $toolbar = $this->gui->toolbar();
   288         $f = $this->gui->ui()->factory();
   291         foreach ($this->items as $month => $items) {
   292             $label = $this->util->getMonthPresentation($month);
   293             $m[] = 
$f->button()->shy(
   296             )->withUnavailableAction();
   297             foreach ($items as $item) {
   298                 $label = $item[
"title"];
   299                 if ((
int) $item[
"id"] === $this->blog_page) {
   300                     $label = 
"» " . $label;
   301                     $dd_title = $item[
"title"];
   303                 $label = str_pad(
"", 12, 
" ") . $label;
   304                 $m[] = 
$f->link()->standard(
   311             $toolbar->addStickyItem(
$f->dropdown()->standard($m)->withLabel(
   319         return "<span style='vertical-align: bottom; max-width:60px; display: inline-block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;'>" . $label . 
"</span>";
 
getDropdownLabel(string $label)
 
renderPostingDropdown(string $cmd)
 
renderPreviousButton(string $href="")
 
getPostingTarget(int $posting, string $cmd)
 
renderNextButton(string $href="")
 
setParameterByClass(string $a_class, string $a_parameter, $a_value)
 
getPreviousMonth( $current_month)
 
getPreviousPosting(int $blog_page)
 
ILIAS Blog Presentation Util $util
 
getMonthTarget(string $month)
 
renderActionDropdown(bool $single_posting)
 
InternalDomainService $domain
 
renderNavButton(string $dir, string $href="")
 
getNextPosting(int $blog_page)
 
getNextMonth( $current_month)
 
__construct(InternalDomainService $domain, InternalGUIService $gui)
 
renderToolbarNavigation(BlogAccess $blog_acces, array $a_items, int $blog_page, bool $single_posting, $month, int $portfolio_page)