Download the PHP package codingfogey/fontawesome-bundle without Composer

On this page you can find all versions of the php package codingfogey/fontawesome-bundle. 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 fontawesome-bundle

As braincrafted/bootstrap-bundle now supports Font Awesome directly, this bundle is no longer maintained.

CodingfogeyFontAwesomeBundle

License Total Downloads Latest Stable Version Latest Unstable Version Build Status Scrutinizer Quality Score SensioLabsInsight Stories in Ready

knpbundles.com

About

This Bundle makes it easy to integrate Font Awesome into your Symfony2 projects.

Prerequisites

Installation

  1. Add codingfogey/fontawesome-bundle to your composer.json:

    {
        ...
        "require": {
            ...
            "codingfogey/fontawesome-bundle": "dev-master",
            "fortawesome/font-awesome": "v4.0.3"
        }
        ...
    }
  2. Add CodingfogeyFontAwesomeBundle to your AppKernel.php:

    ...
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Codingfogey\Bundle\FontAwesomeBundle\CodingfogeyFontAwesomeBundle()
        );
        ...
    }
    ...
  3. Update your dependencies: composer update.

NOTICE Installing Font Awesome via composer is optional but makes this bundle work out of the box. So I recommend this way.

Configuration

If you did not install Font Awesome via composer you have to configure the path to your installation:

codingfogey_font_awesome:
    assets_dir: %kernel.root_dir%/../vendor/fortawesome/font-awesome

Customization

If you want to customize Font Awesome you have to put a customized variables file somewhere in your project and configure the path. You also have to set the output path.

codingfogey_font_awesome:
    filter: less
    customize:
        variables_file:         %kernel.root_dir%/Resources/fontawesome/variables.less
        font_awesome_output:    %kernel.root_dir%/Resources/less/fontawesome.less

If you want to use the lessphp or sass Assetic filter you have to set the filter variable accordingly.

There is a command to generate a customized output file to incorporate your customized variables file:

app/console codingfogey:fontawesome:generate

Usage

Installation of font files

The bundle provides a command to install the font files to the web/fonts directory:

app/console codingfogey:fontawesome:install

There is also a ScriptHandler for conveniently doing this automatically on each composer install or composer update:

...
"scripts": {
    "post-install-cmd": [
        ...
        "Codingfogey\\Bundle\\FontAwesomeBundle\\Composer\\ScriptHandler::install"
    ],
    "post-update-cmd": [
        ...
        "Codingfogey\\Bundle\\FontAwesomeBundle\\Composer\\ScriptHandler::install"
    ]
},
...

To include the Font Awesome css just include @fontawesome_css in your base template.

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>{% block title %}Welcome!{% endblock %}</title>
        {% block stylesheets %}
            {% stylesheets
                '@fontawesome_css'
            %}
                <link rel="stylesheet" href="{{ asset_url }}" media="screen"/>
            {% endstylesheets %}
        {% endblock %}

Adding icons

You can add icons as described here.

You can also use the handy Twig function.

NOTICE: This function does not work if you changed the @fa-css-prefix variable.

Simple icons

To insert a simple icon add {{ fa_icon( icon name|options ) }} into your template.

The parameter can be a string containing only the icon name without fa- prefix or JSON for more customization. The complete set of options is as follows:

{
    icon:           name of the icon without 'fa-' prefix
    scale:          [lg|2x|3x|4x|5x|stack-1x|stack-2x],
    fixed-width:    [true|false],
    list-icon:      [true|false],
    border:         [true|false],
    pull:           [left|right],
    spin:           [true|false],
    rotate:         [90|180|270],
    flip:           [horizontal|vertical],
    inverse:        [true|false]
}

Stacked icons

To insert stacked icons add {{ fa_icon( options, options [, container] ) }} into your template. The first parameter is for the foreground icon, the second is for the background icon. These have to be JSON because you have to provide at least two parameters for each icon. The name of the icon and the scale.

The last parameter is optional and can contain options for the container element. The complete set of container options is as follows:

{
    type:           html element type for the container (default: span)
    scale:          [lg|2x|3x|4x|5x]
}

TODO

Look here.

License

Acknowledgment


All versions of fontawesome-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/symfony Version >=2.3
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 codingfogey/fontawesome-bundle contains the following files

Loading the files please wait ....