diff --git a/library/Kubernetes/Web/CronJobListItemDetailed.php b/library/Kubernetes/Web/CronJobListItemDetailed.php index d3359f09..666da248 100644 --- a/library/Kubernetes/Web/CronJobListItemDetailed.php +++ b/library/Kubernetes/Web/CronJobListItemDetailed.php @@ -4,15 +4,19 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Icons; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Link; use ipl\Web\Widget\StateBall; @@ -91,5 +95,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall('none', StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/DaemonSetListItemDetailed.php b/library/Kubernetes/Web/DaemonSetListItemDetailed.php index f27a5915..f095e0d9 100644 --- a/library/Kubernetes/Web/DaemonSetListItemDetailed.php +++ b/library/Kubernetes/Web/DaemonSetListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Format; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -112,5 +116,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/DeploymentListItemDetailed.php b/library/Kubernetes/Web/DeploymentListItemDetailed.php index 7516bb67..1b7c9fc9 100644 --- a/library/Kubernetes/Web/DeploymentListItemDetailed.php +++ b/library/Kubernetes/Web/DeploymentListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Format; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -116,5 +120,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/IngressListItemDetailed.php b/library/Kubernetes/Web/IngressListItemDetailed.php index 3881f9a7..6f361f70 100644 --- a/library/Kubernetes/Web/IngressListItemDetailed.php +++ b/library/Kubernetes/Web/IngressListItemDetailed.php @@ -4,14 +4,18 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Link; use ipl\Web\Widget\StateBall; @@ -84,5 +88,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall('none', StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/JobListItemDetailed.php b/library/Kubernetes/Web/JobListItemDetailed.php index 745d6a8d..a31e11af 100644 --- a/library/Kubernetes/Web/JobListItemDetailed.php +++ b/library/Kubernetes/Web/JobListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Format; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -123,5 +127,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/NamespaceListItemDetailed.php b/library/Kubernetes/Web/NamespaceListItemDetailed.php index cd4f39da..c7cfc1df 100644 --- a/library/Kubernetes/Web/NamespaceListItemDetailed.php +++ b/library/Kubernetes/Web/NamespaceListItemDetailed.php @@ -4,11 +4,13 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Links; use Icinga\Module\Kubernetes\Model\DaemonSet; use Icinga\Module\Kubernetes\Model\Deployment; +use Icinga\Module\Kubernetes\Model\Favorite; use Icinga\Module\Kubernetes\Model\Ingress; use Icinga\Module\Kubernetes\Model\NamespaceModel; use Icinga\Module\Kubernetes\Model\PersistentVolume; @@ -165,5 +167,18 @@ protected function assembleVisual(BaseHtmlElement $visual): void } else { $visual->addHtml(new StateBall('none', StateBall::SIZE_MEDIUM)); } + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/NodeListItemDetailed.php b/library/Kubernetes/Web/NodeListItemDetailed.php index c51cef01..be9c340e 100644 --- a/library/Kubernetes/Web/NodeListItemDetailed.php +++ b/library/Kubernetes/Web/NodeListItemDetailed.php @@ -4,8 +4,11 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use Icinga\Util\Format; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -80,5 +84,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/PersistentVolumeClaimListItemDetailed.php b/library/Kubernetes/Web/PersistentVolumeClaimListItemDetailed.php index acf1f7c8..eaa8aa49 100644 --- a/library/Kubernetes/Web/PersistentVolumeClaimListItemDetailed.php +++ b/library/Kubernetes/Web/PersistentVolumeClaimListItemDetailed.php @@ -5,9 +5,12 @@ namespace Icinga\Module\Kubernetes\Web; use Icinga\Module\Kubernetes\Common\AccessModes; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Icons; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use Icinga\Module\Kubernetes\Model\PersistentVolumeClaim; use Icinga\Util\Format; use ipl\Html\Attributes; @@ -17,6 +20,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\EmptyState; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; @@ -119,5 +123,18 @@ protected function assembleVisual(BaseHtmlElement $visual): void $visual->addHtml( new Icon($this->getPhaseIcon(), ['class' => ['pvc-phase-' . strtolower($this->item->phase)]]) ); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/PersistentVolumeListItemDetailed.php b/library/Kubernetes/Web/PersistentVolumeListItemDetailed.php index c6473d5d..477e22ca 100644 --- a/library/Kubernetes/Web/PersistentVolumeListItemDetailed.php +++ b/library/Kubernetes/Web/PersistentVolumeListItemDetailed.php @@ -5,9 +5,12 @@ namespace Icinga\Module\Kubernetes\Web; use Icinga\Module\Kubernetes\Common\AccessModes; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Icons; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use Icinga\Module\Kubernetes\Model\PersistentVolume; use Icinga\Util\Format; use ipl\Html\Attributes; @@ -17,6 +20,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -108,5 +112,18 @@ protected function assembleVisual(BaseHtmlElement $visual): void $visual->addHtml( new Icon($this->getPhaseIcon(), ['class' => ['pv-phase-' . strtolower($this->item->phase)]]) ); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/PodListItemDetailed.php b/library/Kubernetes/Web/PodListItemDetailed.php index 93b7b84a..5b8ad448 100644 --- a/library/Kubernetes/Web/PodListItemDetailed.php +++ b/library/Kubernetes/Web/PodListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Links; use Icinga\Module\Kubernetes\Model\Container; +use Icinga\Module\Kubernetes\Model\Favorite; use Icinga\Module\Kubernetes\Model\InitContainer; use Icinga\Module\Kubernetes\Model\SidecarContainer; use ipl\Html\Attributes; @@ -16,6 +19,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -145,5 +149,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/ReplicaSetListItemDetailed.php b/library/Kubernetes/Web/ReplicaSetListItemDetailed.php index 9a28aa53..7132ffe9 100644 --- a/library/Kubernetes/Web/ReplicaSetListItemDetailed.php +++ b/library/Kubernetes/Web/ReplicaSetListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Format; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -107,5 +111,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/ServiceListItemDetailed.php b/library/Kubernetes/Web/ServiceListItemDetailed.php index 125c8996..f8df71ef 100644 --- a/library/Kubernetes/Web/ServiceListItemDetailed.php +++ b/library/Kubernetes/Web/ServiceListItemDetailed.php @@ -4,14 +4,18 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlDocument; use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Link; use ipl\Web\Widget\StateBall; @@ -76,5 +80,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall('none', StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } } diff --git a/library/Kubernetes/Web/StatefulSetListItemDetailed.php b/library/Kubernetes/Web/StatefulSetListItemDetailed.php index a11fa829..617f73f0 100644 --- a/library/Kubernetes/Web/StatefulSetListItemDetailed.php +++ b/library/Kubernetes/Web/StatefulSetListItemDetailed.php @@ -4,9 +4,12 @@ namespace Icinga\Module\Kubernetes\Web; +use Icinga\Module\Kubernetes\Common\Auth; use Icinga\Module\Kubernetes\Common\BaseListItem; +use Icinga\Module\Kubernetes\Common\Database; use Icinga\Module\Kubernetes\Common\Format; use Icinga\Module\Kubernetes\Common\Links; +use Icinga\Module\Kubernetes\Model\Favorite; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\Html; @@ -14,6 +17,7 @@ use ipl\Html\HtmlElement; use ipl\Html\Text; use ipl\I18n\Translation; +use ipl\Stdlib\Filter; use ipl\Web\Widget\HorizontalKeyValue; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; @@ -133,5 +137,18 @@ protected function assembleTitle(BaseHtmlElement $title): void protected function assembleVisual(BaseHtmlElement $visual): void { $visual->addHtml(new StateBall($this->item->icinga_state, StateBall::SIZE_MEDIUM)); + + $rs = Favorite::on(Database::connection()) + ->filter(Filter::all( + Filter::equal('resource_uuid', $this->item->uuid), + Filter::equal('username', Auth::getInstance()->getUser()->getUsername()) + )) + ->execute(); + + $visual->addHtml((new FavoriteToggleForm($rs->hasResult())) + ->setAction(Links::toggleFavorite($this->item->uuid)->getAbsoluteUrl()) + ->setAttribute('class', 'favorite-toggle') + ->setAttribute('data-base-target', '_self') + ); } }