FragmentRendererInterface

interface FragmentRendererInterface Interface implemented by all rendering strategies. Methods Response render(string|ControllerReference $uri, Request $request, array $options = array()) Renders a URI and returns the Response content. string getName() Gets the name of the strategy. Details Response render(string|ControllerReference $uri, Request $request, array $options = array()) Renders a URI and returns the Response content. Paramete

FragmentRendererInterface::getName()

string getName() Gets the name of the strategy. Return Value string The strategy name

FragmentRendererInterface::render()

Response render(string|ControllerReference $uri, Request $request, array $options = array()) Renders a URI and returns the Response content. Parameters string|ControllerReference $uri A URI as a string or a ControllerReference instance Request $request A Request instance array $options An array of options Return Value Response A Response instance

FragmentListener::onKernelRequest()

onKernelRequest(GetResponseEvent $event) Fixes request attributes when the path is '/_fragment'. Parameters GetResponseEvent $event A GetResponseEvent instance Exceptions AccessDeniedHttpException if the request does not come from a trusted IP.

FragmentListener

class FragmentListener implements EventSubscriberInterface Handles content fragments represented by special URIs. All URL paths starting with /_fragment are handled as content fragments by this listener. If throws an AccessDeniedHttpException exception if the request is not signed or if it is not an internal sub-request. Methods __construct(UriSigner $signer, string $fragmentPath = '/_fragment') Constructor. onKernelRequest(GetResponseEvent $event) Fixes request attributes when the

FragmentHandler::render()

string|null render(string|ControllerReference $uri, string $renderer = 'inline', array $options = array()) Renders a URI and returns the Response content. Available options: ignore_errors: true to return an empty string in case of an error Parameters string|ControllerReference $uri A URI as a string or a ControllerReference instance string $renderer The renderer name array $options An array of options Return Value string|null The Response content or null when the Response is s

FragmentListener::getSubscribedEvents()

static array getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) a

FormView::offsetSet()

offsetSet($name, $value) Implements \ArrayAccess. Parameters $name $value Exceptions BadMethodCallException always as setting a child by name is not allowed

FragmentHandler

class FragmentHandler Renders a URI that represents a resource fragment. This class handles the rendering of resource fragments that are included into a main resource. The handling of the rendering is managed by specialized renderers. Methods __construct(RequestStack $requestStack, array $renderers = array(), bool $debug = false) Constructor. addRenderer(FragmentRendererInterface $renderer) Adds a renderer. string|null render(string|ControllerReference $uri, string $renderer =

FormView::offsetUnset()

offsetUnset(string $name) Removes a child (implements \ArrayAccess). Parameters string $name The child name