2017 © Pedro Peláez
 

yii2-extension yii2-webfontkit

Set of icon frameworks for use in Yii Framework 2.0

image

dalencar/yii2-webfontkit

Set of icon frameworks for use in Yii Framework 2.0

  • Sunday, April 26, 2015
  • by davidsonalencar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-webfontkit

This extension offers an easy method to setup various webfont frameworks to work with Yii Framework 2.0., (*1)

  1. Open Sans
  2. Roboto

Installation

The preferred way to install this extension is through composer., (*2)

Note: Check the composer.json for this extension's requirements and dependencies., (*3)

Either run, (*4)

$ php composer.phar require dalencar/yii2-webfontkit "dev-master"

or add, (*5)

"dalencar/yii2-webfontkit": "dev-master"

to the require section of your composer.json file., (*6)

Usage

Global Setup

In case you wish to setup one or more Webfont framework globally, set the parameter webfontkit-framework in the params array of your Yii Configuration File., (*7)

'params' => [
  'webfontkit-framework' => [
    'os',  // Open Sans Webfont framework
  ],
]

To initialize the globally setup framework, you can proceed in one of two ways:, (*8)

  1. In your view, call this code in your view or view layout file:
use dalencar\webfontkit\WebFontKit;
WebFontKit::register($this);
  1. Or in your asset bundle, adding the dalencar\webfontkit\WebFontKit class as depends
public $depends [
  'dalencar\webfontkit\WebFontKit',
],

Per View Setup

You can also call each icon-framework individually in your view or view layout like below. Map any icon framework within each view as in the example below., (*9)

use dalencar\webfontkit\WebFontKit;
WebFontKit::register($this, WebFontKit::OS); // Register the Open Sans webfont framework

License

yii2-webfontkit is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*10)

The Versions

26/04 2015

dev-master

9999999-dev https://github.com/dalencar/yii2-webfontkit

Set of icon frameworks for use in Yii Framework 2.0

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 yii font webfont font-face