Get support for KnpLabs/rad-view-renderer

If you're new to LTH, please see our FAQ for more information on what it is we do.

Support Options

Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:

View Open Issues

Take a look to see if anyone else has experienced the same issue as you and if they managed to solve it.

Open an Issue

Make sure to read any relevant guidelines for opening issues on this repo before posting a new issue.

Sponsor directly

Check out the page and see if there are any options to sponsor this project or it's developers directly.

KnpLabs/rad-view-renderer

DEPRECATED

Unfortunately we decided to not maintain this project anymore (see why). If you want to mark another package as a replacement for this one please send an email to hello@knplabs.com.

Rad view renderer

Allow to guess a view when the controller does not return a Response.

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

Installation

Install the library:

$ composer require knplabs/rad-view-renderer

If you are using Symfony, add the bundle inside your AppKernel.php:

$bundles = array(
    // ...
    new Knp\Rad\ViewRenderer\Bundle\ViewRendererBundle(),
);

Usage

Let's take the following controller:

namespace App\Controller;

class TestController
{
    public function someAction()
    {
        return ['foo' => 'bar'];
    }
}

By default the rad view renderer will take a look of the request content type in order to guess wich kind of render it will use. It exists many kind of renderer that can display many content types.

You can disable some native renderers using the renderers parameter in your config.yml:

knp_rad_view_renderer:
    renderers: [controller, twig]

The twig renderer

One of the most useful renderer, it takes the controller class in order to guess the template to display. For example:

App\Controller\TestController::someAction => @App/Resources/views/Test/some.%format%.twig
Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2