Browse Source

code doc fix

tags/2.0.8
Klimov Paul 7 years ago
parent
commit
eb3fc7cf67
  1. 34
      .travis.yml
  2. 24
      ActiveField.php
  3. 4
      ActiveForm.php
  4. 2
      BaseHtml.php
  5. 2
      Button.php
  6. 4
      ButtonDropdown.php
  7. 4
      ButtonGroup.php
  8. 5
      Carousel.php
  9. 6
      Collapse.php
  10. 6
      Dropdown.php
  11. 12
      Nav.php
  12. 8
      NavBar.php
  13. 2
      Progress.php
  14. 12
      Tabs.php
  15. 6
      ToggleButtonGroup.php
  16. 16
      composer.json
  17. 1
      phpunit.xml.dist

34
.travis.yml

@ -1,21 +1,25 @@
language: php
php: php:
- 5.4 - 5.4
- 5.5 - 5.5
- 5.6 - 5.6
- 7.0 - 7.0
- 7.1 - 7.1
matrix: matrix:
include: include:
- php: hhvm - php: hhvm
sudo: true sudo: true
dist: trusty dist: trusty
group: edge group: edge
cache: cache:
directories: "$HOME/.composer/cache" directories: "$HOME/.composer/cache"
before_install: before_install:
- wget https://phar.phpunit.de/phpunit-4.5.1.phar - wget https://phar.phpunit.de/phpunit-4.5.1.phar
script: script:
- php phpunit-4.5.1.phar --verbose $PHPUNIT_FLAGS - php phpunit-4.5.1.phar --verbose $PHPUNIT_FLAGS
sudo: false sudo: false
# cache vendor dirs # cache vendor dirs

24
ActiveField.php

@ -21,7 +21,7 @@ use yii\helpers\ArrayHelper;
* - [[inline]]/[[inline()]] is used to render inline [[checkboxList()]] and [[radioList()]] * - [[inline]]/[[inline()]] is used to render inline [[checkboxList()]] and [[radioList()]]
* - [[enableError]] can be set to `false` to disable to the error * - [[enableError]] can be set to `false` to disable to the error
* - [[enableLabel]] can be set to `false` to disable to the label * - [[enableLabel]] can be set to `false` to disable to the label
* - [[label()]] can be used with a `boolean` argument to enable/disable the label * - [[label()]] can be used with a `bool` argument to enable/disable the label
* *
* There are also some new placeholders that you can use in the [[template]] configuration: * There are also some new placeholders that you can use in the [[template]] configuration:
* *
@ -91,7 +91,7 @@ use yii\helpers\ArrayHelper;
class ActiveField extends \yii\widgets\ActiveField class ActiveField extends \yii\widgets\ActiveField
{ {
/** /**
* @var boolean whether to render [[checkboxList()]] and [[radioList()]] inline. * @var bool whether to render [[checkboxList()]] and [[radioList()]] inline.
*/ */
public $inline = false; public $inline = false;
/** /**
@ -136,17 +136,17 @@ class ActiveField extends \yii\widgets\ActiveField
*/ */
public $inlineRadioListTemplate = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}"; public $inlineRadioListTemplate = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}";
/** /**
* @var boolean whether to render the error. Default is `true` except for layout `inline`. * @var bool whether to render the error. Default is `true` except for layout `inline`.
*/ */
public $enableError = true; public $enableError = true;
/** /**
* @var boolean whether to render the label. Default is `true`. * @var bool whether to render the label. Default is `true`.
*/ */
public $enableLabel = true; public $enableLabel = true;
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function __construct($config = []) public function __construct($config = [])
{ {
@ -156,7 +156,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function render($content = null) public function render($content = null)
{ {
@ -188,7 +188,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function checkbox($options = [], $enclosedByLabel = true) public function checkbox($options = [], $enclosedByLabel = true)
{ {
@ -213,7 +213,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function radio($options = [], $enclosedByLabel = true) public function radio($options = [], $enclosedByLabel = true)
{ {
@ -238,7 +238,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function checkboxList($items, $options = []) public function checkboxList($items, $options = [])
{ {
@ -266,7 +266,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function radioList($items, $options = []) public function radioList($items, $options = [])
{ {
@ -298,7 +298,7 @@ class ActiveField extends \yii\widgets\ActiveField
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. There are also a special options: * the attributes of the resulting tag. There are also a special options:
* *
* - encode: boolean, whether value should be HTML-encoded or not. * - encode: bool, whether value should be HTML-encoded or not.
* *
* @return $this the field object itself * @return $this the field object itself
* @since 2.0.5 * @since 2.0.5
@ -312,7 +312,7 @@ class ActiveField extends \yii\widgets\ActiveField
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function label($label = null, $options = []) public function label($label = null, $options = [])
{ {

4
ActiveForm.php

@ -84,7 +84,7 @@ class ActiveForm extends \yii\widgets\ActiveForm
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function init() public function init()
{ {
@ -99,7 +99,7 @@ class ActiveForm extends \yii\widgets\ActiveForm
} }
/** /**
* @inheritdoc * {@inheritdoc}
* @return ActiveField the created ActiveField object * @return ActiveField the created ActiveField object
*/ */
public function field($model, $attribute, $options = []) public function field($model, $attribute, $options = [])

2
BaseHtml.php

@ -48,7 +48,7 @@ class BaseHtml extends \yii\helpers\Html
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. There are also a special options: * the attributes of the resulting tag. There are also a special options:
* *
* - encode: boolean, whether value should be HTML-encoded or not. * - encode: bool, whether value should be HTML-encoded or not.
* *
* @return string generated HTML * @return string generated HTML
* @see http://getbootstrap.com/css/#forms-controls-static * @see http://getbootstrap.com/css/#forms-controls-static

2
Button.php

@ -33,7 +33,7 @@ class Button extends Widget
*/ */
public $label = 'Button'; public $label = 'Button';
/** /**
* @var boolean whether the label should be HTML-encoded. * @var bool whether the label should be HTML-encoded.
*/ */
public $encodeLabel = true; public $encodeLabel = true;

4
ButtonDropdown.php

@ -56,7 +56,7 @@ class ButtonDropdown extends Widget
*/ */
public $dropdown = []; public $dropdown = [];
/** /**
* @var boolean whether to display a group of split-styled button group. * @var bool whether to display a group of split-styled button group.
*/ */
public $split = false; public $split = false;
/** /**
@ -64,7 +64,7 @@ class ButtonDropdown extends Widget
*/ */
public $tagName = 'button'; public $tagName = 'button';
/** /**
* @var boolean whether the label should be HTML-encoded. * @var bool whether the label should be HTML-encoded.
*/ */
public $encodeLabel = true; public $encodeLabel = true;
/** /**

4
ButtonGroup.php

@ -49,11 +49,11 @@ class ButtonGroup extends Widget
* *
* - label: string, required, the button label. * - label: string, required, the button label.
* - options: array, optional, the HTML attributes of the button. * - options: array, optional, the HTML attributes of the button.
* - visible: boolean, optional, whether this button is visible. Defaults to true. * - visible: bool, optional, whether this button is visible. Defaults to true.
*/ */
public $buttons = []; public $buttons = [];
/** /**
* @var boolean whether to HTML-encode the button labels. * @var bool whether to HTML-encode the button labels.
*/ */
public $encodeLabels = true; public $encodeLabels = true;

5
Carousel.php

@ -39,13 +39,12 @@ use yii\helpers\ArrayHelper;
class Carousel extends Widget class Carousel extends Widget
{ {
/** /**
* @var array|boolean the labels for the previous and the next control buttons. * @var array|bool the labels for the previous and the next control buttons.
* If false, it means the previous and the next control buttons should not be displayed. * If false, it means the previous and the next control buttons should not be displayed.
*/ */
public $controls = ['‹', '›']; public $controls = ['‹', '›'];
/** /**
* @var boolean * @var bool whether carousel indicators (<ol> tag with anchors to items) should be displayed or not.
* If false carousel indicators (<ol> tag with anchors to items) should not be displayed.
*/ */
public $showIndicators = true; public $showIndicators = true;
/** /**

6
Collapse.php

@ -58,7 +58,7 @@ class Collapse extends Widget
* group with the following structure: * group with the following structure:
* *
* - label: string, required, the group header label. * - label: string, required, the group header label.
* - encode: boolean, optional, whether this label should be HTML-encoded. This param will override * - encode: bool, optional, whether this label should be HTML-encoded. This param will override
* global `$this->encodeLabels` param. * global `$this->encodeLabels` param.
* - content: array|string|object, required, the content (HTML) of the group * - content: array|string|object, required, the content (HTML) of the group
* - options: array, optional, the HTML attributes of the group * - options: array, optional, the HTML attributes of the group
@ -87,11 +87,11 @@ class Collapse extends Widget
*/ */
public $items = []; public $items = [];
/** /**
* @var boolean whether the labels for header items should be HTML-encoded. * @var bool whether the labels for header items should be HTML-encoded.
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**
* @var boolean whether to close other items if an item is opened. Defaults to `true` which causes an * @var bool whether to close other items if an item is opened. Defaults to `true` which causes an
* accordion effect. Set this to `false` to allow keeping multiple items open at once. * accordion effect. Set this to `false` to allow keeping multiple items open at once.
* @since 2.0.7 * @since 2.0.7
*/ */

6
Dropdown.php

@ -39,10 +39,10 @@ class Dropdown extends Widget
* or an array representing a single menu with the following structure: * or an array representing a single menu with the following structure:
* *
* - label: string, required, the label of the item link. * - label: string, required, the label of the item link.
* - encode: boolean, optional, whether to HTML-encode item label. * - encode: bool, optional, whether to HTML-encode item label.
* - url: string|array, optional, the URL of the item link. This will be processed by [[\yii\helpers\Url::to()]]. * - url: string|array, optional, the URL of the item link. This will be processed by [[\yii\helpers\Url::to()]].
* If not set, the item will be treated as a menu header when the item has no sub-menu. * If not set, the item will be treated as a menu header when the item has no sub-menu.
* - visible: boolean, optional, whether this menu item is visible. Defaults to true. * - visible: bool, optional, whether this menu item is visible. Defaults to true.
* - linkOptions: array, optional, the HTML attributes of the item link. * - linkOptions: array, optional, the HTML attributes of the item link.
* - options: array, optional, the HTML attributes of the item. * - options: array, optional, the HTML attributes of the item.
* - items: array, optional, the submenu items. The structure is the same as this property. * - items: array, optional, the submenu items. The structure is the same as this property.
@ -54,7 +54,7 @@ class Dropdown extends Widget
*/ */
public $items = []; public $items = [];
/** /**
* @var boolean whether the labels for header items should be HTML-encoded. * @var bool whether the labels for header items should be HTML-encoded.
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**

12
Nav.php

@ -59,30 +59,30 @@ class Nav extends Widget
* *
* - label: string, required, the nav item label. * - label: string, required, the nav item label.
* - url: optional, the item's URL. Defaults to "#". * - url: optional, the item's URL. Defaults to "#".
* - visible: boolean, optional, whether this menu item is visible. Defaults to true. * - visible: bool, optional, whether this menu item is visible. Defaults to true.
* - linkOptions: array, optional, the HTML attributes of the item's link. * - linkOptions: array, optional, the HTML attributes of the item's link.
* - options: array, optional, the HTML attributes of the item container (LI). * - options: array, optional, the HTML attributes of the item container (LI).
* - active: boolean, optional, whether the item should be on active state or not. * - active: bool, optional, whether the item should be on active state or not.
* - dropDownOptions: array, optional, the HTML options that will passed to the [[Dropdown]] widget. * - dropDownOptions: array, optional, the HTML options that will passed to the [[Dropdown]] widget.
* - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget, * - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget,
* or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. * or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus.
* - encode: boolean, optional, whether the label will be HTML-encoded. If set, supersedes the $encodeLabels option for only this item. * - encode: bool, optional, whether the label will be HTML-encoded. If set, supersedes the $encodeLabels option for only this item.
* *
* If a menu item is a string, it will be rendered directly without HTML encoding. * If a menu item is a string, it will be rendered directly without HTML encoding.
*/ */
public $items = []; public $items = [];
/** /**
* @var boolean whether the nav items labels should be HTML-encoded. * @var bool whether the nav items labels should be HTML-encoded.
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**
* @var boolean whether to automatically activate items according to whether their route setting * @var bool whether to automatically activate items according to whether their route setting
* matches the currently requested route. * matches the currently requested route.
* @see isItemActive * @see isItemActive
*/ */
public $activateItems = true; public $activateItems = true;
/** /**
* @var boolean whether to activate parent menu items when one of the corresponding child menu items is active. * @var bool whether to activate parent menu items when one of the corresponding child menu items is active.
*/ */
public $activateParents = false; public $activateParents = false;
/** /**

8
NavBar.php

@ -56,18 +56,18 @@ class NavBar extends Widget
*/ */
public $containerOptions = []; public $containerOptions = [];
/** /**
* @var string|boolean the text of the brand or false if it's not used. Note that this is not HTML-encoded. * @var string|bool the text of the brand or false if it's not used. Note that this is not HTML-encoded.
* @see https://getbootstrap.com/docs/3.3/components/#navbar * @see https://getbootstrap.com/docs/3.3/components/#navbar
*/ */
public $brandLabel = false; public $brandLabel = false;
/** /**
* @var string|boolean src of the brand image or false if it's not used. Note that this param will override `$this->brandLabel` param. * @var string|bool src of the brand image or false if it's not used. Note that this param will override `$this->brandLabel` param.
* @see https://getbootstrap.com/docs/3.3/components/#navbar * @see https://getbootstrap.com/docs/3.3/components/#navbar
* @since 2.0.8 * @since 2.0.8
*/ */
public $brandImage = false; public $brandImage = false;
/** /**
* @var array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[\yii\helpers\Url::to()]] * @var array|string|bool $url the URL for the brand's hyperlink tag. This parameter will be processed by [[\yii\helpers\Url::to()]]
* and will be used for the "href" attribute of the brand link. Default value is false that means * and will be used for the "href" attribute of the brand link. Default value is false that means
* [[\yii\web\Application::homeUrl]] will be used. * [[\yii\web\Application::homeUrl]] will be used.
* You may set it to `null` if you want to have no link at all. * You may set it to `null` if you want to have no link at all.
@ -88,7 +88,7 @@ class NavBar extends Widget
*/ */
public $screenReaderToggleText = 'Toggle navigation'; public $screenReaderToggleText = 'Toggle navigation';
/** /**
* @var boolean whether the navbar content should be included in an inner div container which by default * @var bool whether the navbar content should be included in an inner div container which by default
* adds left and right padding. Set this to false for a 100% width navbar. * adds left and right padding. Set this to false for a 100% width navbar.
*/ */
public $renderInnerContainer = true; public $renderInnerContainer = true;

2
Progress.php

@ -63,7 +63,7 @@ class Progress extends Widget
*/ */
public $label; public $label;
/** /**
* @var integer the amount of progress as a percentage. * @var int the amount of progress as a percentage.
*/ */
public $percent = 0; public $percent = 0;
/** /**

12
Tabs.php

@ -65,7 +65,7 @@ class Tabs extends Widget
* tab with the following structure: * tab with the following structure:
* *
* - label: string, required, the tab header label. * - label: string, required, the tab header label.
* - encode: boolean, optional, whether this label should be HTML-encoded. This param will override * - encode: bool, optional, whether this label should be HTML-encoded. This param will override
* global `$this->encodeLabels` param. * global `$this->encodeLabels` param.
* - headerOptions: array, optional, the HTML attributes of the tab header. * - headerOptions: array, optional, the HTML attributes of the tab header.
* - linkOptions: array, optional, the HTML attributes of the tab header link tags. * - linkOptions: array, optional, the HTML attributes of the tab header link tags.
@ -73,12 +73,12 @@ class Tabs extends Widget
* - url: string, optional, an external URL. When this is specified, clicking on this tab will bring * - url: string, optional, an external URL. When this is specified, clicking on this tab will bring
* the browser to this URL. This option is available since version 2.0.4. * the browser to this URL. This option is available since version 2.0.4.
* - options: array, optional, the HTML attributes of the tab pane container. * - options: array, optional, the HTML attributes of the tab pane container.
* - active: boolean, optional, whether this item tab header and pane should be active. If no item is marked as * - active: bool, optional, whether this item tab header and pane should be active. If no item is marked as
* 'active' explicitly - the first one will be activated. * 'active' explicitly - the first one will be activated.
* - visible: boolean, optional, whether the item tab header and pane should be visible or not. Defaults to true. * - visible: bool, optional, whether the item tab header and pane should be visible or not. Defaults to true.
* - items: array, optional, can be used instead of `content` to specify a dropdown items * - items: array, optional, can be used instead of `content` to specify a dropdown items
* configuration array. Each item can hold three extra keys, besides the above ones: * configuration array. Each item can hold three extra keys, besides the above ones:
* * active: boolean, optional, whether the item tab header and pane should be visible or not. * * active: bool, optional, whether the item tab header and pane should be visible or not.
* * content: string, required if `items` is not set. The content (HTML) of the tab pane. * * content: string, required if `items` is not set. The content (HTML) of the tab pane.
* * contentOptions: optional, array, the HTML attributes of the tab content container. * * contentOptions: optional, array, the HTML attributes of the tab content container.
*/ */
@ -105,7 +105,7 @@ class Tabs extends Widget
*/ */
public $linkOptions = []; public $linkOptions = [];
/** /**
* @var boolean whether the labels for header items should be HTML-encoded. * @var bool whether the labels for header items should be HTML-encoded.
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**
@ -113,7 +113,7 @@ class Tabs extends Widget
*/ */
public $navType = 'nav-tabs'; public $navType = 'nav-tabs';
/** /**
* @var boolean whether to render the `tab-content` container and its content. You may set this property * @var bool whether to render the `tab-content` container and its content. You may set this property
* to be false so that you can manually render `tab-content` yourself in case your tab contents are complex. * to be false so that you can manually render `tab-content` yourself in case your tab contents are complex.
* @since 2.0.1 * @since 2.0.1
*/ */

6
ToggleButtonGroup.php

@ -46,13 +46,13 @@ class ToggleButtonGroup extends InputWidget
*/ */
public $labelOptions = []; public $labelOptions = [];
/** /**
* @var boolean whether the items labels should be HTML-encoded. * @var bool whether the items labels should be HTML-encoded.
*/ */
public $encodeLabels = true; public $encodeLabels = true;
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function init() public function init()
{ {
@ -63,7 +63,7 @@ class ToggleButtonGroup extends InputWidget
} }
/** /**
* @inheritdoc * {@inheritdoc}
*/ */
public function run() public function run()
{ {

16
composer.json

@ -14,7 +14,21 @@
"authors": [ "authors": [
{ {
"name": "Qiang Xue", "name": "Qiang Xue",
"email": "qiang.xue@gmail.com" "email": "qiang.xue@gmail.com",
"homepage": "http://www.yiiframework.com/"
},
{
"name": "Alexander Makarov",
"email": "sam@rmcreative.ru",
"homepage": "http://rmcreative.ru/"
},
{
"name": "Antonio Ramirez",
"email": "amigo.cobos@gmail.com"
},
{
"name": "Paul Klimov",
"email": "klimov.paul@gmail.com"
} }
], ],
"require": { "require": {

1
phpunit.xml.dist

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="./tests/bootstrap.php" <phpunit bootstrap="./tests/bootstrap.php"
colors="true" colors="true"
verbose="true"
convertErrorsToExceptions="true" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"

Loading…
Cancel
Save