2017 © Pedro Peláez
 

yii2-extension yii2-icheck

Yii2 ICheck

image

phpnt/yii2-icheck

Yii2 ICheck

  • Friday, December 15, 2017
  • by phpnt
  • Repository
  • 1 Watchers
  • 3 Stars
  • 923 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

phpNT - Yii2 ICheck

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Описание:

Стилизованный чекбоксы и радиокнопки.

DEMO


### - Поддержать phpNT

Социальные сети:


Установка:, (*2)


php composer.phar require "phpnt/yii2-icheck" "*"

или, (*3)

composer require phpnt/yii2-icheck

или добавить в composer.json файл, (*4)

"phpnt/yii2-icheck": "*"

### Представление:

use phpnt\ICheck\ICheck;


STYLE_MIMIMAL (цвета для STYLE_MIMIMAL - minimal (черный), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_MIMIMAL, 'color' => 'green' // цвет ]) ?> = $form->field($model, 'checkbox2')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'minimal', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'checkbox3')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'red', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>
= $form->field($model, 'radio')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_MIMIMAL, 'color' => 'green' // цвет ]) ?> = $form->field($model, 'radio2')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Вася2', 2 => 'Катя2', 3 => 'Жора'], 'color' => 'purple', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio3')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_MIMIMAL, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'blue', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>

STYLE_SQUARE (цвета для STYLE_SQUARE - square (черный), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox4', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_SQUARE, 'color' => 'square' // цвет ]) ?> = $form->field($model, 'checkbox5')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'green', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?> = $form->field($model, 'checkbox6')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'red', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio4')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_SQUARE, 'color' => 'blue' // цвет ]) ?> = $form->field($model, 'radio5')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'yellow', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio6')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_SQUARE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'aero', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>

STYLE_FLAT (цвета для STYLE_SQUARE - flat (черный), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox7', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_FLAT, 'color' => 'flat' // цвет ]) ?> = $form->field($model, 'checkbox8')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'green', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?> = $form->field($model, 'checkbox9')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'red', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio7')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_FLAT, 'color' => 'blue' // цвет ]) ?> = $form->field($model, 'radio8')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'yellow', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio9')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FLAT, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'aero', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>

STYLE_LINE (цвета для STYLE_LINE - line (черный), red, green, blue, aero, grey, orange, yellow, pink, purple)

= $form->field($model, 'checkbox10')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Вася'], 'color' => 'yellow', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; }, ]]) ?> = $form->field($model, 'checkbox11')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'red', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; }, ]]) ?>
= $form->field($model, 'radio10')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_LINE, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'color' => 'pink', // цвет 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; }, ]]) ?>

STYLE_POLARIS

= $form->field($model, 'checkbox12', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_POLARIS, ]) ?> = $form->field($model, 'checkbox13')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?> = $form->field($model, 'checkbox14')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio11')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_POLARIS, ]) ?> = $form->field($model, 'radio12')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio13')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_POLARIS, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>

STYLE_FUTURICO

= $form->field($model, 'checkbox15', ['template' => '{label} {input}'])->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX, 'style' => ICheck::STYLE_FUTURICO, ]) ?> = $form->field($model, 'checkbox16')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?> = $form->field($model, 'checkbox17')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_CHECBOX_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?>
= $form->field($model, 'radio14')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO, 'style' => ICheck::STYLE_FUTURICO, ]) ?> = $form->field($model, 'radio15')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return '
'; } ]]) ?> = $form->field($model, 'radio16')->widget(ICheck::className(), [ 'type' => ICheck::TYPE_RADIO_LIST, 'style' => ICheck::STYLE_FUTURICO, 'items' => [1 => 'Вася', 2 => 'Катя', 3 => 'Жора'], 'options' => [ 'item' => function ($index, $label, $name, $checked, $value){ return ' '; } ]]) ?>

Документация:

## ICheck

Лицензия:

### MIT

The Versions

15/12 2017

dev-master

9999999-dev

Yii2 ICheck

  Sources   Download

MIT

The Requires

 

yii2 icheck phpnt

15/12 2017

0.0.2

0.0.2.0

Yii2 ICheck

  Sources   Download

MIT

The Requires

 

yii2 icheck phpnt

01/05 2017

0.0.1

0.0.1.0

Yii2 ICheck

  Sources   Download

MIT

The Requires

 

yii2 icheck phpnt