yii2-helpers A collection of useful helper functions for Yii Framework 2.0.

  1. Introduction
  2. CHANGE LOG
  3. Requirements
  4. Installation
  5. Usage
  6. Report
  7. License
  8. Resources

Introduction

This extension is a collection of useful helper functions (and classes) for Yii Framework 2.0. This extension works well together with the yii2-widgets extension. > NOTE:
> No additional client assets (CSS/JS) are included with this extension. So there is no performance overhead due to additional Javascript or Cascading Style Sheets. The helper classes require the default bootstrap 3.0 assets that are automatically registered with your Yii 2.0 install.

Html Class

`VIEW DEMO`

This class extends the Yii Html Helper to incorporate additional HTML markup functionality and features available in Twitter Bootstrap 3.0. The helper functions available in this class are:

  • CSS Style Helpers
    • addCssStyle
    • removeCssStyle
    • setCssStyle
    • getCssStyles
    • parseCssStyles
  • Icon
  • Label
  • Badge
  • Page Header
  • Well
  • Close Button
  • Caret
  • Jumbotron
  • Abbreviation
  • Blockquote
  • Address
  • List Group
  • Panel
  • Media
  • Media List
Enum Class

`VIEW DEMO`

This class extends the Yii Inflector Helper with more utility functions for Yii developers. The helper functions available in this class are:

  • Is Empty
  • Properize
  • Time Elapsed
  • Format Bytes
  • Number to Words
  • Year List
  • Date List
  • Time List
  • Boolean List
  • Array to Table
  • IP Address
  • Browser Information

CHANGE LOG

Requirements

  • Yii 2.0 (*)
  • PHP 5.4
  • Twitter Bootstrap 3.0

NOTE: This extension mandatorily requires Yii Framework 2. The framework is under active development and the first stable release of Yii 2 is expected in early 2014.

Installation

The preferred way to install this extension is through composer.

Either run:

$ php composer.phar require kartik-v/yii2-helpers "*"

or add:

"kartik-v/yii2-helpers": "*"

to the require section of your composer.json file.

Usage

// add this to your code to use these classes
use kartik\helpers\Html;
use kartik\helpers\Enum;

// examples of usage
echo Html::icon('cloud');
echo Enum::properize('Chris');

Report

License

yii2-helpers is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

Resources

2 2
47 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: Kartik V
Created on: Dec 2, 2013
Last updated: 6 years ago

Related Extensions