registerArgument('table', 'string', 'The rating tablename'); $this->registerArgument('uid', 'integer', 'The uid of the object', true); $this->registerArgument('class', 'string', 'The class', true); $this->registerArgument('id', 'string', 'The id'); } /** * Renders the ratingView * * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return mixed * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception * @noinspection PhpFullyQualifiedNameUsageInspection */ public static function renderStatic( array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { $tagBuilder = new TagBuilder('button'); if ($arguments['id']) { $tagBuilder->addAttribute('id',$arguments['id']); } $tagBuilder->addAttribute('class',$arguments['class']); $tagBuilder->addAttribute('data-table',$arguments['table']); $tagBuilder->addAttribute('data-uid',$arguments['uid']); $tagBuilder->addAttribute('data-blr-type','bookmark'); /** @var UriBuilder $uriBuilder */ $uriBuilder = $renderingContext->getControllerContext()->getUriBuilder(); $uriBuilder->reset(); $uriBuilder->setTargetPageType(874655); $tagBuilder->addAttribute('data-status-url',$uriBuilder->buildFrontendUri()); $uriBuilder->reset(); $uriBuilder->setTargetPageType(874654); $tagBuilder->addAttribute('data-toggle-url',$uriBuilder->buildFrontendUri()); $tagBuilder->setContent((string)$renderChildrenClosure()); return $tagBuilder->render(); } }