2017 © Pedro Peláez
 

yii2-extension yii2-traits

Yii2 traits library

image

demmonico/yii2-traits

Yii2 traits library

  • Friday, June 8, 2018
  • by demmonico
  • Repository
  • 1 Watchers
  • 0 Stars
  • 123 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 8 Versions
  • 4 % Grown

The README.md

Yii2 traits library

Description

Yii2 traits library which used in web-application development., (*1)

Composition

AjaxValidationTrait

Trait add perform ajax validation to models and forms., (*2)

Usage:

use demmonico\models\Model as parent or set in you model, (*3)

use AjaxValidationTrait;

in controller, (*4)

if (!is_null($validate = $model->performAjaxValidation()))
            return $validate;

ConstantTrait

!!! This trait is DEPRECATED Use demmonico/reflection instead!!!, (*5)

Trait generates array of class constant labels or one label by constant value, (*6)

Usage:

set in your model, (*7)

use ConstantTrait;

const NAME_FIRST = 1;
const NAME_SECOND = 2;

then anywhere get array values and names of constants:, (*8)

ModelName::getName();   // returns array(1 => 'First', 2 => 'Second');

or, (*9)

$model->getName();      // returns array(1 => 'First', 2 => 'Second');

Whether get name by constant value:, (*10)

ModelName::getName(ModelName::NAME_FIRST);   // returns 'First';

The Versions

08/06 2018

dev-master

9999999-dev https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

12/10 2016

v1.2.1

1.2.1.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

12/10 2016

v1.2.0

1.2.0.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

06/10 2016

v1.1.2

1.1.2.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

06/10 2016

v1.1.1

1.1.1.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

25/08 2016

v1.1.0

1.1.0.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

22/08 2016

v1.0.1

1.0.1.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii

22/08 2016

1.0.0

1.0.0.0 https://github.com/demmonico/yii2-traits

Yii2 traits library

  Sources   Download

MIT

The Requires

 

by Dmitry demmonico

component extension yii2 trait yii