Skip to content
Permalink
Browse files

Modify dependencies: minimum-stability is set to dev, add .scrutinize…

…r file, prefer-stable is true
  • Loading branch information...
itstructure committed May 11, 2018
1 parent 5adb7e2 commit 2405c1a1c9523312baa2dd55f30bef175917801c
@@ -0,0 +1,11 @@
checks:
php:
code_rating: true
duplication: true

filter:
excluded_paths:
- vendor/*

before_commands:
- "composer install --prefer-source"
@@ -1,6 +1,13 @@
1 Introduction
------------

[![Latest Stable Version](https://poser.pugx.org/itstructure/yii2-field-widgets/v/stable)](https://packagist.org/packages/itstructure/yii2-field-widgets)
[![Latest Unstable Version](https://poser.pugx.org/itstructure/yii2-field-widgets/v/unstable)](https://packagist.org/packages/itstructure/yii2-field-widgets)
[![License](https://poser.pugx.org/itstructure/yii2-field-widgets/license)](https://packagist.org/packages/itstructure/yii2-field-widgets)
[![Total Downloads](https://poser.pugx.org/itstructure/yii2-field-widgets/downloads)](https://packagist.org/packages/itstructure/yii2-field-widgets)
[![Build Status](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/badges/build.png?b=master)](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/build-status/master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/itstructure/yii2-field-widgets/?branch=master)

This is form field's widgets for the yii2 framework with the next field types:

- text
@@ -13,19 +20,19 @@ This is form field's widgets for the yii2 framework with the next field types:
- password

## 2 Dependencies
- php >= 7
- php >= 7.1
- composer

## 3 Installation

Via composer:

```composer require "itstructure/yii2-field-widgets": "^1.0.0"```
```composer require "itstructure/yii2-field-widgets": "^1.2.0"```
or in section **require** of composer.json file set the following:
```
"require": {
"itstructure/yii2-field-widgets": "^1.0.0"
"itstructure/yii2-field-widgets": "^1.2.0"
}
```
and command ```composer install```, if you install yii2 project extensions first,
@@ -1,11 +1,22 @@
### CHANGE LOG:

**1.1.0:**
**1.2.0 May 12, 2018:**
- Modify dependencies: minimum-stability is set to dev.
- Set prefer-stable is true
- Add .scrutinizer file.
- Add badges:
- Latest Stable Version
- Latest Unstable Version
- License
- Total Downloads.
- Build Status
- Scrutinizer Code Quality

**1.1.0 February 13, 2018:**
- Depricate className() function. Use WidgetClass::class.

**1.0.0:**
**1.0.0 February 4, 2018:**
- Create form field's widgets for the yii2 framework with the next field types:

- text
- textarea
- ckeditor
@@ -4,9 +4,10 @@
"type": "yii2-extension",
"keywords": ["yii2", "yii 2", "field", "widget", "multilanguage"],
"require": {
"yiisoft/yii2": "~2.0.5",
"yiisoft/yii2-bootstrap": "~2.0.0",
"itstructure/yii2-ckeditor": "^1.0.0"
"php": ">=7.1.0",
"yiisoft/yii2": "2.*",
"yiisoft/yii2-bootstrap": "^2.0",
"itstructure/yii2-ckeditor": "^1.1.0"
},
"license": "MIT",
"authors": [
@@ -15,7 +16,8 @@
"email": "girnikandrey@gmail.com"
}
],
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Itstructure\\FieldWidgets\\": "src/"
@@ -4,8 +4,7 @@
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\base\{InvalidConfigException, Widget};
use yii\db\ActiveRecord;
use yii\base\{Model, InvalidConfigException, Widget};
use Itstructure\FieldWidgets\interfaces\LanguageFieldInterface;
/**
@@ -18,7 +17,7 @@
* @property string $preset
* @property bool $ckeditor
* @property ActiveForm $form
* @property ActiveRecord $model
* @property Model $model
* @property array $data
* @property array $options
* @property bool $hide
@@ -80,7 +79,7 @@ class FieldType extends Widget
/**
* The model to which the field corresponds.
*
* @var ActiveRecord
* @var Model
*/
public $model;
@@ -3,8 +3,7 @@
namespace Itstructure\FieldWidgets;
use Itstructure\FieldWidgets\interfaces\LanguageListInterface;
use yii\base\{Model, Widget};
use yii\db\ActiveRecord;
use yii\base\{Widget, Model};
use yii\widgets\ActiveForm;
/**
@@ -13,7 +12,7 @@
*
* @property array $fields
* @property LanguageListInterface|null $languageModel
* @property ActiveRecord $model
* @property Model $model
* @property ActiveForm $form
*
* @package Itstructure\FieldWidgets
@@ -95,7 +94,7 @@ class Fields extends Widget
/**
* Model with fields.
*
* @var ActiveRecord
* @var Model
*/
private $model;
@@ -2,8 +2,7 @@
namespace Itstructure\FieldWidgets;
use yii\db\ActiveRecord;
use yii\base\{Widget, InvalidConfigException};
use yii\base\{Model, Widget, InvalidConfigException};
use Itstructure\FieldWidgets\interfaces\LanguageListInterface;
/**
@@ -12,7 +11,7 @@
*
* @property LanguageListInterface $languageModel
* @property array $fields
* @property ActiveRecord $model
* @property Model $model
*
* @package Itstructure\FieldWidgets
*/
@@ -53,7 +52,7 @@ class TableMultilanguage extends Widget
/**
* Model for current fields.
*
* @var ActiveRecord
* @var Model
*/
private $model;
@@ -72,11 +71,11 @@ public function setLanguageModel(LanguageListInterface $languageModel): void
/**
* Sets the model of the current fields.
*
* @param ActiveRecord $model
* @param Model $model
*
* @return void
*/
public function setModel(ActiveRecord $model): void
public function setModel(Model $model): void
{
$this->model = $model;
}
@@ -2,8 +2,7 @@
namespace Itstructure\FieldWidgets;
use yii\base\{Widget, InvalidConfigException};
use yii\db\ActiveRecord;
use yii\base\{Model, Widget, InvalidConfigException};
use Itstructure\FieldWidgets\interfaces\LanguageFieldInterface;
/**
@@ -12,7 +11,7 @@
*
* @property string $name
* @property string $label
* @property ActiveRecord $model
* @property Model $model
* @property LanguageFieldInterface $language
* @property string $default
*
@@ -37,7 +36,7 @@ class TableMultilanguageField extends Widget
/**
* The model of the current field.
*
* @var ActiveRecord
* @var Model
*/
public $model;
@@ -26,7 +26,7 @@ public function getShortName(): string;
/**
* Returns default mode.
*
* @return string
* @return int
*/
public function getDefault(): string;
public function getDefault(): int;
}
@@ -1,15 +1,15 @@
<?php
use yii\base\Model;
use yii\helpers\ArrayHelper;
use yii\db\ActiveRecord;
use yii\widgets\ActiveForm;
use Itstructure\FieldWidgets\FieldType;
use Itstructure\FieldWidgets\interfaces\{LanguageListInterface, LanguageFieldInterface};
/** @var LanguageListInterface|ActiveRecord $languageModel */
/** @var LanguageFieldInterface|ActiveRecord $language */
/** @var LanguageListInterface $languageModel */
/** @var LanguageFieldInterface $language */
/** @var array[] $fields */
/** @var ActiveRecord $model */
/** @var Model $model */
/** @var ActiveForm $form */
function isActive(LanguageFieldInterface $language)
@@ -1,14 +1,15 @@
<?php
use yii\base\Model;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use Itstructure\FieldWidgets\FieldType;
/** @var array[] $fields */
/** @var \yii\db\ActiveRecord $model */
/** @var \yii\widgets\ActiveForm $form */
/** @var Model $model */
/** @var ActiveForm $form */
?>


<div>
<?php foreach ($fields as $field): ?>

@@ -1,12 +1,13 @@
<?php
use yii\base\Model;
use yii\helpers\{ArrayHelper, Html};
use Itstructure\FieldWidgets\TableMultilanguageField;
use Itstructure\FieldWidgets\interfaces\LanguageListInterface;
/** @var LanguageListInterface $languageModel */
/** @var array[] $fields */
/** @var \yii\db\ActiveRecord $model */
/** @var Model $model */
?>

0 comments on commit 2405c1a

Please sign in to comment.
You can’t perform that action at this time.