LinkViewHelper
class LinkViewHelper extends AbstractTagBasedViewHelper (View source)
widget.link ViewHelper This ViewHelper can be used inside widget templates in order to render links pointing to widget actions
= Examples =
<f:widget.link action="widgetAction" arguments="{foo: 'bar'}">some link</f:widget.link>
Properties
protected ControllerContext | $controllerContext | Controller Context to use |
from AbstractViewHelper |
protected ObjectManagerInterface | $objectManager | from AbstractViewHelper | |
protected LoggerInterface | $logger | from AbstractViewHelper | |
protected bool | $escapeOutput | Disable escaping of tag based ViewHelpers so that the rendered tag is not htmlspecialchar'd |
from AbstractTagBasedViewHelper |
protected TagBuilder | $tag | Tag builder instance |
from AbstractTagBasedViewHelper |
protected string | $tagName | ||
protected HashService | $hashService |
Methods
No description
Injects the (system) logger based on PSR-3.
Register a new argument. Call this method from your ViewHelper subclass inside the initializeArguments() method.
Overrides a registered argument. Call this method from your ViewHelper subclass inside the initializeArguments() method if you want to override a previously registered argument.
Register a new tag attribute. Tag attributes are all arguments which will be directly appended to a tag if you call $this->initializeTag()
Registers all standard HTML universal attributes.
Handles additional arguments, sorting out any data- prefixed tag attributes and assigning them. Then passes the unassigned arguments to the parent class' method, which in the default implementation will throw an error about "undeclared argument used".
Initialize arguments
Render the link.
Get the URI for an AJAX Request.
Get the URI for a non-AJAX Request.
Details
void
setRenderingContext(RenderingContextInterface $renderingContext)
No description
void
injectObjectManager(ObjectManagerInterface $objectManager)
No description
void
injectLogger(LoggerInterface $logger)
Injects the (system) logger based on PSR-3.
protected AbstractViewHelper
registerArgument(string $name, string $type, string $description, bool $required = false, mixed $defaultValue = null, bool|null $escape = null)
Register a new argument. Call this method from your ViewHelper subclass inside the initializeArguments() method.
This exists only to throw our own exception!
protected AbstractViewHelper
overrideArgument(string $name, string $type, string $description, bool $required = false, mixed $defaultValue = null, bool|null $escape = null)
Overrides a registered argument. Call this method from your ViewHelper subclass inside the initializeArguments() method if you want to override a previously registered argument.
This exists only to throw our own exception!
bool
isEscapingInterceptorEnabled()
No description
__construct()
Constructor
void
injectTagBuilder(TagBuilder $tag)
No description
void
initialize()
Sets the tag name to $this->tagName.
Additionally, sets all tag attributes which were registered in $this->tagAttributes and additionalArguments.
Will be invoked just before the render method.
protected void
registerTagAttribute(string $name, string $type, string $description, bool $required = false, mixed $defaultValue = null)
Register a new tag attribute. Tag attributes are all arguments which will be directly appended to a tag if you call $this->initializeTag()
protected void
registerUniversalTagAttributes()
Registers all standard HTML universal attributes.
Should be used inside registerArguments();
void
handleAdditionalArguments(array $arguments)
Handles additional arguments, sorting out any data- prefixed tag attributes and assigning them. Then passes the unassigned arguments to the parent class' method, which in the default implementation will throw an error about "undeclared argument used".
void
initializeArguments()
Initialize arguments
string
render()
Render the link.
protected string
getAjaxUri()
Get the URI for an AJAX Request.
protected string
getWidgetUri()
Get the URI for a non-AJAX Request.