Download the PHP package cristianoc72/icon-button without Composer

On this page you can find all versions of the php package cristianoc72/icon-button. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package icon-button

Icon-button

Build Status

Icon-button is an extension for Symfony Form button and submit types. You can easily add an icon to your buttons, after or before the label.

By now, only Bootstrap Glyphicons are supported.

Installation

Install this package via composer:

Working with Silex

Be sure you've enabled TwigServiceProvider and FormServiceProvider and all its dependencies. See http://silex.sensiolabs.org/doc/providers/form.html.

Then register the extension in your Application:

and tell Twig about the icon-button template;

Working with Symfony

Register the extension as a service:

Usage

Icon-button extension adds two new properties to Symfony button type: icon and icon_position. icon property is a string containing the glyphicon css selector for the icon.

You can display your icon before or after the button label, by setting icon-position property. icon_position accepts one of the following values: after, before, 0, 1 (0 means 'before' and 1 means 'after'):

And this is the result:

Save button with icon after the label

If you prefer the icon before the label:

And the result is the following:

Save button with icon before the label

When you're working on a multi step form wizard, you always define a previous step button and a next step button. When you add a button named previous_step or next_step to your form, this extension automatically adds an icon as follow:

So that, if you're satisfied of the default icons, you can simply write:

And this is the resulting buttons:

Previous and next buttons

If you need a reset button too, it's put between previous and next buttons:

And here it is:

Previous, next and reset buttons

Tests

This library uses PhpUnit for testing. To run the test suite, from your project root directory, do:

Contribution

Each contribution is wellcome! A typo (expecially about my awful English), a bug fix, an addiction, a suggestion, everything is important.

If you want to contribute, simply fork this repository and submit a pull request.

Of course, there are a few little conventions to follow, before submitting a pull request:

License

This library is released under the MIT license. See LICENSE file for details.


All versions of icon-button with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
symfony/form Version ^3.0
symfony/twig-bridge Version ^3.0
symfony/translation Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cristianoc72/icon-button contains the following files

Loading the files please wait ....