2017 © Pedro Peláez
 

yii2-extension yii2-tools

Yii2 application tools

image

deesoft/yii2-tools

Yii2 application tools

  • Sunday, October 23, 2016
  • by mdmunir
  • Repository
  • 1 Watchers
  • 0 Stars
  • 315 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

yii2-tools

Yii2 Tools, (*1)

Installation

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

Either run, (*3)

php composer.phar require deesoft/yii2-tools "~1.0"

or add, (*4)

"deesoft/yii2-tools": "~1.0"

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

AutoHandlerBehavior

Define event handler in self class., (*6)

class User extends ActiveRecord
{
    public function onBeforeSave($event)
    {
        // execute at event beforeSave
        // do someting
    }

    public function behaviors()
    {
        return [
            'dee\tools\AutoHandlerBehavior',
        ];
    }
}

State

Save information of client(browser)., (*7)

// config
'components' => [
    ...
    'profile' => 'dee\tools\State',
]

Usage

// this information is unique per client.
Yii::$app->profile->address = 'Jl. Buntu No 3426 Lamongan';

echo Yii::$app->profile->address;

The Versions

23/10 2016

dev-master

9999999-dev

Yii2 application tools

  Sources   Download

BSD-3-Clause

The Requires

 

by Misbahul Munir

yii2 event state

26/04 2016

1.0

1.0.0.0

Yii2 application tools

  Sources   Download

BSD-3-Clause

The Requires

 

by Misbahul Munir

yii2 event state