symfonycontrib/link-button-bundle

Symfony form button as a link (ex. Cancel action).

v2.0.0 2016-09-03 03:42 UTC

This package is not auto-updated.

Last update: 2024-04-13 12:12:05 UTC


README

This bundle provides an form extension for the button type to allow an HTML "" tag as a button. For example, a cancel link on a form.

Installation

1. Add the bundle to your composer.json

"require": {
    ...
    "symfonycontrib/link-button-bundle": "^2.0"
}

2. Install the bundle using composer

$ composer update symfonycontrib/link-button-bundle

3. Add this bundle to your application's kernel:

    new SymfonyContrib\Bundle\LinkButtonBundle\LinkButtonBundle(),

How to Use

To use, simply pass a URL to an url option of a form button.

** Example Form **

->add('cancel', 'button', [
    'url' => '/',
]);