ylicensenumberformatter Yii formatter to display a human readable license code

  1. Installation
  2. Usage
  3. Resources

Consider you have in your database a license number in string format but without separators, but you want to display it with some dashes to the user in order to improve readability.

Say:

123456789012 -> 1234-5678-9012

Installation

Unpack YLicenseNumberFormatter to your protected/extensions, edit your config file and add the following:

...
    'components'=>array(
    ... 
        'format' => array(
            ...
            'class' => 'ext.YLicenseNumberFormatter',

Usage

In your view:

array(
    'name'=>'yourFieldName',
    'type'=>'licenseNumber',
),

Resources

0 0
4 followers
0 downloads
Yii Version: Unknown
License: GPL-3.0
Category: User Interface
Tags:
Developed by: Maxxer
Created on: Mar 12, 2014
Last updated: 10 years ago