diff --git a/common/components/parsers/CustomConverter.php b/common/components/parsers/CustomConverter.php index b054b8c..e377092 100644 --- a/common/components/parsers/CustomConverter.php +++ b/common/components/parsers/CustomConverter.php @@ -1,5 +1,5 @@ =5.3.2" + }, + "require-dev": { + "sami/sami": "dev-master" + }, + "suggest": { + "ext-gd": "to use the GD implementation", + "ext-gmagick": "to use the Gmagick implementation", + "ext-imagick": "to use the Imagick implementation" + }, + "type": "library", + "autoload": { + "psr-0": { + "Imagine": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bulat Shakirzyanov", + "email": "mallluhuct@gmail.com", + "homepage": "http://avalanche123.com" + } + ], + "description": "Image processing for PHP 5.3", + "homepage": "http://imagine.readthedocs.org/", + "keywords": [ + "drawing", + "graphics", + "image manipulation", + "image processing" + ], + "time": "2013-07-10 17:25:36" + }, + { "name": "swiftmailer/swiftmailer", "version": "v5.4.1", "source": { @@ -459,21 +511,21 @@ }, { "name": "yiisoft/yii2-bootstrap", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-bootstrap.git", - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0" + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1464f93834b1d5edb1f5625f7ffd6c3723fa4923", + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923", "shasum": "" }, "require": { "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", - "yiisoft/yii2": ">=2.0.4" + "yiisoft/yii2": ">=2.0.6" }, "type": "yii2-extension", "extra": { @@ -505,7 +557,7 @@ "bootstrap", "yii2" ], - "time": "2015-05-10 22:08:17" + "time": "2015-09-23 17:48:24" }, { "name": "yiisoft/yii2-composer", @@ -555,6 +607,54 @@ "time": "2015-03-01 06:22:44" }, { + "name": "yiisoft/yii2-imagine", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-imagine.git", + "reference": "0961343138b65bba447de84b2b300899617e6acc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/0961343138b65bba447de84b2b300899617e6acc", + "reference": "0961343138b65bba447de84b2b300899617e6acc", + "shasum": "" + }, + "require": { + "imagine/imagine": "0.5.*", + "yiisoft/yii2": "*" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "yii\\imagine\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Antonio Ramirez", + "email": "amigo.cobos@gmail.com" + } + ], + "description": "The Imagine integration for the Yii framework", + "keywords": [ + "helper", + "image", + "imagine", + "yii2" + ], + "time": "2015-03-01 06:22:44" + }, + { "name": "yiisoft/yii2-swiftmailer", "version": "2.0.4", "source": { @@ -634,101 +734,6 @@ } }, { - "name": "composer/installers", - "version": "v1.0.21", - "source": { - "type": "git", - "url": "https://github.com/composer/installers.git", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", - "shasum": "" - }, - "replace": { - "roundcube/plugin-installer": "*", - "shama/baton": "*" - }, - "require-dev": { - "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" - }, - "type": "composer-installer", - "extra": { - "class": "Composer\\Installers\\Installer", - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Composer\\Installers\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kyle Robinson Young", - "email": "kyle@dontkry.com", - "homepage": "https://github.com/shama" - } - ], - "description": "A multi-framework Composer library installer", - "homepage": "http://composer.github.com/installers/", - "keywords": [ - "Craft", - "Dolibarr", - "Hurad", - "MODX Evo", - "OXID", - "SMF", - "Thelia", - "WolfCMS", - "agl", - "aimeos", - "annotatecms", - "bitrix", - "cakephp", - "chef", - "codeigniter", - "concrete5", - "croogo", - "dokuwiki", - "drupal", - "elgg", - "fuelphp", - "grav", - "installer", - "joomla", - "kohana", - "laravel", - "lithium", - "magento", - "mako", - "mediawiki", - "modulework", - "moodle", - "phpbb", - "piwik", - "ppi", - "puppet", - "roundcube", - "shopware", - "silverstripe", - "symfony", - "typo3", - "wordpress", - "zend", - "zikula" - ], - "time": "2015-02-18 17:17:01" - }, - { "name": "fzaninotto/faker", "version": "v1.5.0", "source": { @@ -815,55 +820,6 @@ "time": "2013-11-01 13:02:21" }, { - "name": "silverstripe/framework", - "version": "3.1.13", - "source": { - "type": "git", - "url": "https://github.com/silverstripe/silverstripe-framework.git", - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silverstripe/silverstripe-framework/zipball/04b803dfc6dc60f2e6a38fa74f957156230b54be", - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be", - "shasum": "" - }, - "require": { - "composer/installers": "*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~3.7@stable" - }, - "type": "silverstripe-module", - "autoload": { - "classmap": [ - "tests/behat/features/bootstrap" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "SilverStripe", - "homepage": "http://silverstripe.com" - }, - { - "name": "The SilverStripe Community", - "homepage": "http://silverstripe.org" - } - ], - "description": "The SilverStripe framework", - "homepage": "http://silverstripe.org", - "keywords": [ - "framework", - "silverstripe" - ], - "time": "2015-05-28 06:59:11" - }, - { "name": "yiisoft/yii2-codeception", "version": "2.0.4", "source": { diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 678c94e..7a91153 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,7 +6,4 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'SilverStripe\\Framework\\Test\\Behaviour\\CmsFormsContext' => $baseDir . '/framework/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php', - 'SilverStripe\\Framework\\Test\\Behaviour\\CmsUiContext' => $baseDir . '/framework/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php', - 'SilverStripe\\Framework\\Test\\Behaviour\\FeatureContext' => $baseDir . '/framework/tests/behat/features/bootstrap/FeatureContext.php', ); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 996972f..495ed85 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,7 +6,7 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Imagine' => array($vendorDir . '/imagine/imagine/lib'), 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), 'Diff' => array($vendorDir . '/phpspec/php-diff/lib'), - 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 3bef212..c5e2036 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'yii\\swiftmailer\\' => array($vendorDir . '/yiisoft/yii2-swiftmailer'), - 'yii\\multiparser\\' => array($vendorDir . '/yiisoft/multiparser'), + 'yii\\imagine\\' => array($vendorDir . '/yiisoft/yii2-imagine'), 'yii\\gii\\' => array($vendorDir . '/yiisoft/yii2-gii'), 'yii\\faker\\' => array($vendorDir . '/yiisoft/yii2-faker'), 'yii\\debug\\' => array($vendorDir . '/yiisoft/yii2-debug'), diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 90179a7..88927fc 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -617,58 +617,6 @@ ] }, { - "name": "yiisoft/yii2-bootstrap", - "version": "2.0.4", - "version_normalized": "2.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/yiisoft/yii2-bootstrap.git", - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", - "shasum": "" - }, - "require": { - "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", - "yiisoft/yii2": ">=2.0.4" - }, - "time": "2015-05-10 22:08:17", - "type": "yii2-extension", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - }, - "asset-installer-paths": { - "npm-asset-library": "vendor/npm", - "bower-asset-library": "vendor/bower" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "yii\\bootstrap\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com" - } - ], - "description": "The Twitter Bootstrap extension for the Yii framework", - "keywords": [ - "bootstrap", - "yii2" - ] - }, - { "name": "bower-asset/typeahead.js", "version": "v0.10.5", "version_normalized": "0.10.5.0", @@ -941,151 +889,159 @@ ] }, { - "name": "composer/installers", - "version": "v1.0.21", - "version_normalized": "1.0.21.0", + "name": "yiisoft/yii2-bootstrap", + "version": "2.0.5", + "version_normalized": "2.0.5.0", "source": { "type": "git", - "url": "https://github.com/composer/installers.git", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" + "url": "https://github.com/yiisoft/yii2-bootstrap.git", + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1464f93834b1d5edb1f5625f7ffd6c3723fa4923", + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923", "shasum": "" }, - "replace": { - "roundcube/plugin-installer": "*", - "shama/baton": "*" - }, - "require-dev": { - "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "require": { + "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", + "yiisoft/yii2": ">=2.0.6" }, - "time": "2015-02-18 17:17:01", - "type": "composer-installer", + "time": "2015-09-23 17:48:24", + "type": "yii2-extension", "extra": { - "class": "Composer\\Installers\\Installer", "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0.x-dev" + }, + "asset-installer-paths": { + "npm-asset-library": "vendor/npm", + "bower-asset-library": "vendor/bower" } }, "installation-source": "dist", "autoload": { - "psr-0": { - "Composer\\Installers\\": "src/" + "psr-4": { + "yii\\bootstrap\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Kyle Robinson Young", - "email": "kyle@dontkry.com", - "homepage": "https://github.com/shama" + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com" } ], - "description": "A multi-framework Composer library installer", - "homepage": "http://composer.github.com/installers/", + "description": "The Twitter Bootstrap extension for the Yii framework", "keywords": [ - "Craft", - "Dolibarr", - "Hurad", - "MODX Evo", - "OXID", - "SMF", - "Thelia", - "WolfCMS", - "agl", - "aimeos", - "annotatecms", - "bitrix", - "cakephp", - "chef", - "codeigniter", - "concrete5", - "croogo", - "dokuwiki", - "drupal", - "elgg", - "fuelphp", - "grav", - "installer", - "joomla", - "kohana", - "laravel", - "lithium", - "magento", - "mako", - "mediawiki", - "modulework", - "moodle", - "phpbb", - "piwik", - "ppi", - "puppet", - "roundcube", - "shopware", - "silverstripe", - "symfony", - "typo3", - "wordpress", - "zend", - "zikula" + "bootstrap", + "yii2" ] }, { - "name": "silverstripe/framework", - "version": "3.1.13", - "version_normalized": "3.1.13.0", + "name": "imagine/imagine", + "version": "v0.5.0", + "version_normalized": "0.5.0.0", "source": { "type": "git", - "url": "https://github.com/silverstripe/silverstripe-framework.git", - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be" + "url": "https://github.com/avalanche123/Imagine.git", + "reference": "f64ec666baaa800edcbf237db41121a569230709" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silverstripe/silverstripe-framework/zipball/04b803dfc6dc60f2e6a38fa74f957156230b54be", - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be", + "url": "https://api.github.com/repos/avalanche123/Imagine/zipball/f64ec666baaa800edcbf237db41121a569230709", + "reference": "f64ec666baaa800edcbf237db41121a569230709", "shasum": "" }, "require": { - "composer/installers": "*", "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "~3.7@stable" + "sami/sami": "dev-master" + }, + "suggest": { + "ext-gd": "to use the GD implementation", + "ext-gmagick": "to use the Gmagick implementation", + "ext-imagick": "to use the Imagick implementation" }, - "time": "2015-05-28 06:59:11", - "type": "silverstripe-module", + "time": "2013-07-10 17:25:36", + "type": "library", "installation-source": "dist", "autoload": { - "classmap": [ - "tests/behat/features/bootstrap" - ] + "psr-0": { + "Imagine": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "SilverStripe", - "homepage": "http://silverstripe.com" - }, + "name": "Bulat Shakirzyanov", + "email": "mallluhuct@gmail.com", + "homepage": "http://avalanche123.com" + } + ], + "description": "Image processing for PHP 5.3", + "homepage": "http://imagine.readthedocs.org/", + "keywords": [ + "drawing", + "graphics", + "image manipulation", + "image processing" + ] + }, + { + "name": "yiisoft/yii2-imagine", + "version": "2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/yiisoft/yii2-imagine.git", + "reference": "0961343138b65bba447de84b2b300899617e6acc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/0961343138b65bba447de84b2b300899617e6acc", + "reference": "0961343138b65bba447de84b2b300899617e6acc", + "shasum": "" + }, + "require": { + "imagine/imagine": "0.5.*", + "yiisoft/yii2": "*" + }, + "time": "2015-03-01 06:22:44", + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "yii\\imagine\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { - "name": "The SilverStripe Community", - "homepage": "http://silverstripe.org" + "name": "Antonio Ramirez", + "email": "amigo.cobos@gmail.com" } ], - "description": "The SilverStripe framework", - "homepage": "http://silverstripe.org", + "description": "The Imagine integration for the Yii framework", "keywords": [ - "framework", - "silverstripe" + "helper", + "image", + "imagine", + "yii2" ] } ] diff --git a/vendor/yiisoft/extensions.php b/vendor/yiisoft/extensions.php index 611a823..d4aaf6a 100644 --- a/vendor/yiisoft/extensions.php +++ b/vendor/yiisoft/extensions.php @@ -12,11 +12,11 @@ return array ( '@yii/swiftmailer' => $vendorDir . '/yiisoft/yii2-swiftmailer', ), ), - 'yiisoft/yii2-multiparser' => + 'yiisoft/yii2-multiparser' => array ( 'name' => 'yiisoft/multiparser', 'version' => '1.0', - 'alias' => + 'alias' => array ( '@yii/multiparser' => $vendorDir . '/yiisoft/multiparser', ), @@ -30,15 +30,6 @@ return array ( '@yii/codeception' => $vendorDir . '/yiisoft/yii2-codeception', ), ), - 'yiisoft/yii2-bootstrap' => - array ( - 'name' => 'yiisoft/yii2-bootstrap', - 'version' => '2.0.4.0', - 'alias' => - array ( - '@yii/bootstrap' => $vendorDir . '/yiisoft/yii2-bootstrap', - ), - ), 'yiisoft/yii2-gii' => array ( 'name' => 'yiisoft/yii2-gii', @@ -66,4 +57,22 @@ return array ( '@yii/debug' => $vendorDir . '/yiisoft/yii2-debug', ), ), + 'yiisoft/yii2-bootstrap' => + array ( + 'name' => 'yiisoft/yii2-bootstrap', + 'version' => '2.0.5.0', + 'alias' => + array ( + '@yii/bootstrap' => $vendorDir . '/yiisoft/yii2-bootstrap', + ), + ), + 'yiisoft/yii2-imagine' => + array ( + 'name' => 'yiisoft/yii2-imagine', + 'version' => '2.0.3.0', + 'alias' => + array ( + '@yii/imagine' => $vendorDir . '/yiisoft/yii2-imagine', + ), + ), ); diff --git a/vendor/yiisoft/yii2-bootstrap/ActiveField.php b/vendor/yiisoft/yii2-bootstrap/ActiveField.php index 3181a6c..96ce103 100644 --- a/vendor/yiisoft/yii2-bootstrap/ActiveField.php +++ b/vendor/yiisoft/yii2-bootstrap/ActiveField.php @@ -7,7 +7,6 @@ namespace yii\bootstrap; -use yii\helpers\Html; use yii\helpers\ArrayHelper; /** @@ -291,6 +290,24 @@ class ActiveField extends \yii\widgets\ActiveField } /** + * Renders Bootstrap static form control. + * @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: + * + * - encode: boolean, whether value should be HTML-encoded or not. + * + * @return $this the field object itself + * @since 2.0.5 + * @see http://getbootstrap.com/css/#forms-controls-static + */ + public function staticControl($options = []) + { + $this->adjustLabelFor($options); + $this->parts['{input}'] = Html::activeStaticControl($this->model, $this->attribute, $options); + return $this; + } + + /** * @inheritdoc */ public function label($label = null, $options = []) @@ -310,7 +327,7 @@ class ActiveField extends \yii\widgets\ActiveField /** * @param boolean $value whether to render a inline list - * @return static the field object itself + * @return $this the field object itself * Make sure you call this method before [[checkboxList()]] or [[radioList()]] to have any effect. */ public function inline($value = true) diff --git a/vendor/yiisoft/yii2-bootstrap/ActiveForm.php b/vendor/yiisoft/yii2-bootstrap/ActiveForm.php index 9ff20d7..a574fbf 100644 --- a/vendor/yiisoft/yii2-bootstrap/ActiveForm.php +++ b/vendor/yiisoft/yii2-bootstrap/ActiveForm.php @@ -8,7 +8,6 @@ namespace yii\bootstrap; use Yii; -use yii\helpers\Html; use yii\base\InvalidConfigException; /** @@ -98,4 +97,13 @@ class ActiveForm extends \yii\widgets\ActiveForm } parent::init(); } + + /** + * @inheritdoc + * @return ActiveField the created ActiveField object + */ + public function field($model, $attribute, $options = []) + { + return parent::field($model, $attribute, $options); + } } diff --git a/vendor/yiisoft/yii2-bootstrap/Alert.php b/vendor/yiisoft/yii2-bootstrap/Alert.php index fdd8979..18f3960 100644 --- a/vendor/yiisoft/yii2-bootstrap/Alert.php +++ b/vendor/yiisoft/yii2-bootstrap/Alert.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use Yii; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Alert renders an alert bootstrap component. @@ -136,9 +135,7 @@ class Alert extends Widget */ protected function initOptions() { - Html::addCssClass($this->options, 'alert'); - Html::addCssClass($this->options, 'fade'); - Html::addCssClass($this->options, 'in'); + Html::addCssClass($this->options, ['alert', 'fade', 'in']); if ($this->closeButton !== false) { $this->closeButton = array_merge([ diff --git a/vendor/yiisoft/yii2-bootstrap/Button.php b/vendor/yiisoft/yii2-bootstrap/Button.php index 0dc25a9..985279a 100644 --- a/vendor/yiisoft/yii2-bootstrap/Button.php +++ b/vendor/yiisoft/yii2-bootstrap/Button.php @@ -7,8 +7,6 @@ namespace yii\bootstrap; -use yii\helpers\Html; - /** * Button renders a bootstrap button. * @@ -48,7 +46,7 @@ class Button extends Widget { parent::init(); $this->clientOptions = false; - Html::addCssClass($this->options, 'btn'); + Html::addCssClass($this->options, ['widget' => 'btn']); } /** diff --git a/vendor/yiisoft/yii2-bootstrap/ButtonDropdown.php b/vendor/yiisoft/yii2-bootstrap/ButtonDropdown.php index 8796fc6..1a379d7 100644 --- a/vendor/yiisoft/yii2-bootstrap/ButtonDropdown.php +++ b/vendor/yiisoft/yii2-bootstrap/ButtonDropdown.php @@ -8,7 +8,6 @@ namespace yii\bootstrap; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * ButtonDropdown renders a group or split button dropdown bootstrap component. @@ -75,7 +74,8 @@ class ButtonDropdown extends Widget */ public function run() { - Html::addCssClass($this->containerOptions, 'btn-group'); + // @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release + Html::addCssClass($this->containerOptions, ['widget' => 'btn-group']); $options = $this->containerOptions; $tag = ArrayHelper::remove($options, 'tag', 'div'); @@ -94,7 +94,7 @@ class ButtonDropdown extends Widget */ protected function renderButton() { - Html::addCssClass($this->options, 'btn'); + Html::addCssClass($this->options, ['widget' => 'btn']); $label = $this->label; if ($this->encodeLabel) { $label = Html::encode($label); @@ -102,7 +102,8 @@ class ButtonDropdown extends Widget if ($this->split) { $options = $this->options; $this->options['data-toggle'] = 'dropdown'; - Html::addCssClass($this->options, 'dropdown-toggle'); + Html::addCssClass($this->options, ['toggle' => 'dropdown-toggle']); + unset($this->options['id']); $splitButton = Button::widget([ 'label' => '', 'encodeLabel' => false, @@ -115,7 +116,7 @@ class ButtonDropdown extends Widget if (!isset($options['href'])) { $options['href'] = '#'; } - Html::addCssClass($options, 'dropdown-toggle'); + Html::addCssClass($options, ['toggle' => 'dropdown-toggle']); $options['data-toggle'] = 'dropdown'; $splitButton = ''; } diff --git a/vendor/yiisoft/yii2-bootstrap/ButtonGroup.php b/vendor/yiisoft/yii2-bootstrap/ButtonGroup.php index c99312f..a0c3ec2 100644 --- a/vendor/yiisoft/yii2-bootstrap/ButtonGroup.php +++ b/vendor/yiisoft/yii2-bootstrap/ButtonGroup.php @@ -8,7 +8,6 @@ namespace yii\bootstrap; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * ButtonGroup renders a button group bootstrap component. @@ -66,7 +65,7 @@ class ButtonGroup extends Widget public function init() { parent::init(); - Html::addCssClass($this->options, 'btn-group'); + Html::addCssClass($this->options, ['widget' => 'btn-group']); } /** diff --git a/vendor/yiisoft/yii2-bootstrap/CHANGELOG.md b/vendor/yiisoft/yii2-bootstrap/CHANGELOG.md index 18cf504..ab09b39 100644 --- a/vendor/yiisoft/yii2-bootstrap/CHANGELOG.md +++ b/vendor/yiisoft/yii2-bootstrap/CHANGELOG.md @@ -1,8 +1,21 @@ Yii Framework 2 bootstrap extension Change Log ============================================== -2.0.4 under development ------------------------ +2.0.5 September 23, 2015 +------------------------ + +- Enh #15: Allowed overriding default Bootstrap CSS classes added by widgets (klimov-paul) +- Enh #38: Added object support for `content` option in `Collapse` class (pana1990, ItsReddi) +- Enh #40: Added `visible` option to `yii\bootstrap\Tab` widget items (klimov-paul) +- Enh #41: Added `submenuOptions` support at `yii\bootstrap\Dropdown` (spikyjt, klimov-paul) +- Enh #42: Added support for the glyphicons via `yii\bootstrap\Html::icon()` (klimov-paul) +- Enh #43: Added support for the static form controls via `yii\bootstrap\Html` (klimov-paul) +- Enh #44: Fixed `yii\bootstrap\ButtonDropdown` renders two buttons with the same id, if 'split' is enabled (klimov-paul) +- Enh #50: Added `dropDownOptions` that is passed to `yii\bootstrap\Nav` dropdown items (fbau123) + + +2.0.4 May 10, 2015 +------------------ - Bug #18: `label` option ignored by `yii\bootstrap\Activefield::checkbox()` and `yii\bootstrap\Activefield::radio()` (mikehaertl) - Bug #5984: `yii\bootstrap\Activefield::checkbox()` caused browser to link label to the wrong input (cebe) diff --git a/vendor/yiisoft/yii2-bootstrap/Carousel.php b/vendor/yiisoft/yii2-bootstrap/Carousel.php index 7faf887..d932a66 100644 --- a/vendor/yiisoft/yii2-bootstrap/Carousel.php +++ b/vendor/yiisoft/yii2-bootstrap/Carousel.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Carousel renders a carousel bootstrap javascript component. @@ -73,7 +72,7 @@ class Carousel extends Widget public function init() { parent::init(); - Html::addCssClass($this->options, 'carousel'); + Html::addCssClass($this->options, ['widget' => 'carousel']); } /** @@ -150,7 +149,7 @@ class Carousel extends Widget throw new InvalidConfigException('The "content" option is required.'); } - Html::addCssClass($options, 'item'); + Html::addCssClass($options, ['widget' => 'item']); if ($index === 0) { Html::addCssClass($options, 'active'); } diff --git a/vendor/yiisoft/yii2-bootstrap/Collapse.php b/vendor/yiisoft/yii2-bootstrap/Collapse.php index a2f237a..09335b7 100644 --- a/vendor/yiisoft/yii2-bootstrap/Collapse.php +++ b/vendor/yiisoft/yii2-bootstrap/Collapse.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Collapse renders an accordion bootstrap javascript component. @@ -61,12 +60,11 @@ class Collapse extends Widget * - label: string, required, the group header label. * - encode: boolean, optional, whether this label should be HTML-encoded. This param will override * global `$this->encodeLabels` param. - * - content: array|string, 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 * - contentOptions: optional, the HTML attributes of the group's content */ public $items = []; - /** * @var boolean whether the labels for header items should be HTML-encoded. */ @@ -79,7 +77,7 @@ class Collapse extends Widget public function init() { parent::init(); - Html::addCssClass($this->options, 'panel-group'); + Html::addCssClass($this->options, ['widget' => 'panel-group']); } /** @@ -110,7 +108,7 @@ class Collapse extends Widget } $header = $item['label']; $options = ArrayHelper::getValue($item, 'options', []); - Html::addCssClass($options, 'panel panel-default'); + Html::addCssClass($options, ['panel' => 'panel', 'widget' => 'panel-default']); $items[] = Html::tag('div', $this->renderItem($header, $item, ++$index), $options); } @@ -131,7 +129,7 @@ class Collapse extends Widget $id = $this->options['id'] . '-collapse' . $index; $options = ArrayHelper::getValue($item, 'contentOptions', []); $options['id'] = $id; - Html::addCssClass($options, 'panel-collapse collapse'); + Html::addCssClass($options, ['widget' => 'panel-collapse', 'collapse' => 'collapse']); $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; if ($encodeLabel) { @@ -146,7 +144,7 @@ class Collapse extends Widget $header = Html::tag('h4', $headerToggle, ['class' => 'panel-title']); - if (is_string($item['content'])) { + if (is_string($item['content']) || is_object($item['content'])) { $content = Html::tag('div', $item['content'], ['class' => 'panel-body']) . "\n"; } elseif (is_array($item['content'])) { $content = Html::ul($item['content'], [ @@ -160,7 +158,7 @@ class Collapse extends Widget $content .= Html::tag('div', $item['footer'], ['class' => 'panel-footer']) . "\n"; } } else { - throw new InvalidConfigException('The "content" option should be a string or array.'); + throw new InvalidConfigException('The "content" option should be a string, array or object.'); } } else { throw new InvalidConfigException('The "content" option is required.'); diff --git a/vendor/yiisoft/yii2-bootstrap/Dropdown.php b/vendor/yiisoft/yii2-bootstrap/Dropdown.php index 7537b7b..b68ac11 100644 --- a/vendor/yiisoft/yii2-bootstrap/Dropdown.php +++ b/vendor/yiisoft/yii2-bootstrap/Dropdown.php @@ -9,8 +9,6 @@ namespace yii\bootstrap; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; -use yii\helpers\Url; /** * Dropdown renders a Bootstrap dropdown menu component. @@ -48,6 +46,8 @@ class Dropdown extends Widget * - options: array, optional, the HTML attributes of the item. * - items: array, optional, the submenu items. The structure is the same as this property. * Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it. + * - submenuOptions: array, optional, the HTML attributes for sub-menu container tag. If specified it will be + * merged with [[submenuOptions]]. * * To insert divider use ``. */ @@ -56,6 +56,12 @@ class Dropdown extends Widget * @var boolean whether the labels for header items should be HTML-encoded. */ public $encodeLabels = true; + /** + * @var array|null the HTML attributes for sub-menu container tags. + * If not set - [[options]] value will be used for it. + * @since 2.0.5 + */ + public $submenuOptions; /** @@ -64,8 +70,14 @@ class Dropdown extends Widget */ public function init() { + if ($this->submenuOptions === null) { + // copying of [[options]] kept for BC + // @todo separate [[submenuOptions]] from [[options]] completely before 2.1 release + $this->submenuOptions = $this->options; + unset($this->submenuOptions['id']); + } parent::init(); - Html::addCssClass($this->options, 'dropdown-menu'); + Html::addCssClass($this->options, ['widget' => 'dropdown-menu']); } /** @@ -88,7 +100,7 @@ class Dropdown extends Widget protected function renderItems($items, $options = []) { $lines = []; - foreach ($items as $i => $item) { + foreach ($items as $item) { if (isset($item['visible']) && !$item['visible']) { continue; } @@ -108,16 +120,18 @@ class Dropdown extends Widget if (empty($item['items'])) { if ($url === null) { $content = $label; - Html::addCssClass($itemOptions, 'dropdown-header'); + Html::addCssClass($itemOptions, ['widget' => 'dropdown-header']); } else { $content = Html::a($label, $url, $linkOptions); } } else { - $submenuOptions = $options; - unset($submenuOptions['id']); + $submenuOptions = $this->submenuOptions; + if (isset($item['submenuOptions'])) { + $submenuOptions = array_merge($submenuOptions, $item['submenuOptions']); + } $content = Html::a($label, $url === null ? '#' : $url, $linkOptions) . $this->renderItems($item['items'], $submenuOptions); - Html::addCssClass($itemOptions, 'dropdown-submenu'); + Html::addCssClass($itemOptions, ['widget' => 'dropdown-submenu']); } $lines[] = Html::tag('li', $content, $itemOptions); diff --git a/vendor/yiisoft/yii2-bootstrap/Modal.php b/vendor/yiisoft/yii2-bootstrap/Modal.php index 70e8d41..6555135 100644 --- a/vendor/yiisoft/yii2-bootstrap/Modal.php +++ b/vendor/yiisoft/yii2-bootstrap/Modal.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use Yii; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Modal renders a modal window that can be toggled by clicking on a button. @@ -137,7 +136,7 @@ class Modal extends Widget $this->header = $button . "\n" . $this->header; } if ($this->header !== null) { - Html::addCssClass($this->headerOptions, 'modal-header'); + Html::addCssClass($this->headerOptions, ['widget' => 'modal-header']); return Html::tag('div', "\n" . $this->header . "\n", $this->headerOptions); } else { return null; @@ -169,7 +168,7 @@ class Modal extends Widget protected function renderFooter() { if ($this->footer !== null) { - Html::addCssClass($this->footerOptions, 'modal-footer'); + Html::addCssClass($this->footerOptions, ['widget' => 'modal-footer']); return Html::tag('div', "\n" . $this->footer . "\n", $this->footerOptions); } else { return null; @@ -225,7 +224,7 @@ class Modal extends Widget 'role' => 'dialog', 'tabindex' => -1, ], $this->options); - Html::addCssClass($this->options, 'modal'); + Html::addCssClass($this->options, ['widget' => 'modal']); if ($this->clientOptions !== false) { $this->clientOptions = array_merge(['show' => false], $this->clientOptions); diff --git a/vendor/yiisoft/yii2-bootstrap/Nav.php b/vendor/yiisoft/yii2-bootstrap/Nav.php index 7195662..d59e9b0 100644 --- a/vendor/yiisoft/yii2-bootstrap/Nav.php +++ b/vendor/yiisoft/yii2-bootstrap/Nav.php @@ -10,7 +10,6 @@ namespace yii\bootstrap; use Yii; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Nav renders a nav HTML component. @@ -34,6 +33,11 @@ use yii\helpers\Html; * ['label' => 'Level 1 - Dropdown B', 'url' => '#'], * ], * ], + * [ + * 'label' => 'Login', + * 'url' => ['site/login'], + * 'visible' => Yii::$app->user->isGuest + * ], * ], * 'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation * ]); @@ -59,6 +63,7 @@ class Nav extends Widget * - linkOptions: array, optional, the HTML attributes of the item's link. * - options: array, optional, the HTML attributes of the item container (LI). * - active: boolean, optional, whether the item should be on active state or not. + * - 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, * or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. * @@ -116,7 +121,7 @@ class Nav extends Widget if ($this->dropDownCaret === null) { $this->dropDownCaret = Html::tag('b', '', ['class' => 'caret']); } - Html::addCssClass($this->options, 'nav'); + Html::addCssClass($this->options, ['widget' => 'nav']); } /** @@ -173,8 +178,8 @@ class Nav extends Widget if ($items !== null) { $linkOptions['data-toggle'] = 'dropdown'; - Html::addCssClass($options, 'dropdown'); - Html::addCssClass($linkOptions, 'dropdown-toggle'); + Html::addCssClass($options, ['widget' => 'dropdown']); + Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); if ($this->dropDownCaret !== '') { $label .= ' ' . $this->dropDownCaret; } @@ -204,6 +209,7 @@ class Nav extends Widget protected function renderDropdown($items, $parentItem) { return Dropdown::widget([ + 'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []), 'items' => $items, 'encodeLabels' => $this->encodeLabels, 'clientOptions' => false, diff --git a/vendor/yiisoft/yii2-bootstrap/NavBar.php b/vendor/yiisoft/yii2-bootstrap/NavBar.php index 93c3cb7..15125d1 100644 --- a/vendor/yiisoft/yii2-bootstrap/NavBar.php +++ b/vendor/yiisoft/yii2-bootstrap/NavBar.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use Yii; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * NavBar renders a navbar HTML component. @@ -28,6 +27,7 @@ use yii\helpers\Html; * ['label' => 'Home', 'url' => ['/site/index']], * ['label' => 'About', 'url' => ['/site/about']], * ], + * 'options' => ['class' => 'navbar-nav'], * ]); * NavBar::end(); * ``` @@ -56,12 +56,12 @@ class NavBar extends Widget */ public $containerOptions = []; /** - * @var string|boolean the text of the brand of false if it's not used. Note that this is not HTML-encoded. + * @var string|boolean the text of the brand or false if it's not used. Note that this is not HTML-encoded. * @see http://getbootstrap.com/components/#navbar */ public $brandLabel = false; /** - * @param array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]] + * @var array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]] * 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. */ @@ -94,11 +94,11 @@ class NavBar extends Widget { parent::init(); $this->clientOptions = false; - Html::addCssClass($this->options, 'navbar'); - if ($this->options['class'] === 'navbar') { - Html::addCssClass($this->options, 'navbar-default'); + if (empty($this->options['class'])) { + Html::addCssClass($this->options, ['navbar', 'navbar-default']); + } else { + Html::addCssClass($this->options, ['widget' => 'navbar']); } - Html::addCssClass($this->brandOptions, 'navbar-brand'); if (empty($this->options['role'])) { $this->options['role'] = 'navigation'; } @@ -117,12 +117,11 @@ class NavBar extends Widget } echo $this->renderToggleButton(); if ($this->brandLabel !== false) { - Html::addCssClass($this->brandOptions, 'navbar-brand'); + Html::addCssClass($this->brandOptions, ['widget' => 'navbar-brand']); echo Html::a($this->brandLabel, $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl, $this->brandOptions); } echo Html::endTag('div'); - Html::addCssClass($this->containerOptions, 'collapse'); - Html::addCssClass($this->containerOptions, 'navbar-collapse'); + Html::addCssClass($this->containerOptions, ['collapse' => 'collapse', 'widget' => 'navbar-collapse']); $options = $this->containerOptions; $tag = ArrayHelper::remove($options, 'tag', 'div'); echo Html::beginTag($tag, $options); diff --git a/vendor/yiisoft/yii2-bootstrap/Progress.php b/vendor/yiisoft/yii2-bootstrap/Progress.php index fbc9eb8..14c7122 100644 --- a/vendor/yiisoft/yii2-bootstrap/Progress.php +++ b/vendor/yiisoft/yii2-bootstrap/Progress.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Progress renders a bootstrap progress bar component. @@ -97,7 +96,7 @@ class Progress extends Widget public function init() { parent::init(); - Html::addCssClass($this->options, 'progress'); + Html::addCssClass($this->options, ['widget' => 'progress']); } /** @@ -153,7 +152,7 @@ class Progress extends Widget 'style' => "width:{$percent}%", ]; $options = array_merge($defaultOptions, $options); - Html::addCssClass($options, 'progress-bar'); + Html::addCssClass($options, ['widget' => 'progress-bar']); $out = Html::beginTag('div', $options); $out .= $label; diff --git a/vendor/yiisoft/yii2-bootstrap/README.md b/vendor/yiisoft/yii2-bootstrap/README.md index d647349..0d72d49 100644 --- a/vendor/yiisoft/yii2-bootstrap/README.md +++ b/vendor/yiisoft/yii2-bootstrap/README.md @@ -7,6 +7,8 @@ in Yii applications extremely easy. For license information check the [LICENSE](LICENSE.md)-file. +Documentation is at [docs/guide/README.md](docs/guide/README.md). + [![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-bootstrap/v/stable.png)](https://packagist.org/packages/yiisoft/yii2-bootstrap) [![Total Downloads](https://poser.pugx.org/yiisoft/yii2-bootstrap/downloads.png)](https://packagist.org/packages/yiisoft/yii2-bootstrap) [![Build Status](https://travis-ci.org/yiisoft/yii2-bootstrap.svg?branch=master)](https://travis-ci.org/yiisoft/yii2-bootstrap) diff --git a/vendor/yiisoft/yii2-bootstrap/Tabs.php b/vendor/yiisoft/yii2-bootstrap/Tabs.php index 6e244c6..f60724f 100644 --- a/vendor/yiisoft/yii2-bootstrap/Tabs.php +++ b/vendor/yiisoft/yii2-bootstrap/Tabs.php @@ -9,7 +9,6 @@ namespace yii\bootstrap; use yii\base\InvalidConfigException; use yii\helpers\ArrayHelper; -use yii\helpers\Html; /** * Tabs renders a Tab bootstrap javascript component. @@ -70,7 +69,9 @@ class Tabs extends Widget * - 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. * - options: array, optional, the HTML attributes of the tab pane container. - * - active: boolean, optional, whether the item tab header and pane should be visible or not. + * - active: boolean, 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. + * - visible: boolean, 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 * 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. @@ -121,7 +122,7 @@ class Tabs extends Widget public function init() { parent::init(); - Html::addCssClass($this->options, 'nav ' . $this->navType); + Html::addCssClass($this->options, ['widget' => 'nav', $this->navType]); } /** @@ -148,6 +149,9 @@ class Tabs extends Widget } foreach ($this->items as $n => $item) { + if (!ArrayHelper::remove($item, 'visible', true)) { + continue; + } if (!array_key_exists('label', $item)) { throw new InvalidConfigException("The 'label' option is required."); } @@ -158,13 +162,13 @@ class Tabs extends Widget if (isset($item['items'])) { $label .= ' '; - Html::addCssClass($headerOptions, 'dropdown'); + Html::addCssClass($headerOptions, ['widget' => 'dropdown']); if ($this->renderDropdown($n, $item['items'], $panes)) { Html::addCssClass($headerOptions, 'active'); } - Html::addCssClass($linkOptions, 'dropdown-toggle'); + Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); $linkOptions['data-toggle'] = 'dropdown'; $header = Html::a($label, "#", $linkOptions) . "\n" . Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); @@ -172,7 +176,7 @@ class Tabs extends Widget $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); $options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n); - Html::addCssClass($options, 'tab-pane'); + Html::addCssClass($options, ['widget' => 'tab-pane']); if (ArrayHelper::remove($item, 'active')) { Html::addCssClass($options, 'active'); Html::addCssClass($headerOptions, 'active'); @@ -228,13 +232,16 @@ class Tabs extends Widget if (is_string($item)) { continue; } + if (isset($item['visible']) && !$item['visible']) { + continue; + } if (!array_key_exists('content', $item)) { throw new InvalidConfigException("The 'content' option is required."); } $content = ArrayHelper::remove($item, 'content'); $options = ArrayHelper::remove($item, 'contentOptions', []); - Html::addCssClass($options, 'tab-pane'); + Html::addCssClass($options, ['widget' => 'tab-pane']); if (ArrayHelper::remove($item, 'active')) { Html::addCssClass($options, 'active'); Html::addCssClass($item['options'], 'active'); diff --git a/vendor/yiisoft/yii2-bootstrap/composer.json b/vendor/yiisoft/yii2-bootstrap/composer.json index b3ff507..5faca27 100644 --- a/vendor/yiisoft/yii2-bootstrap/composer.json +++ b/vendor/yiisoft/yii2-bootstrap/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "yiisoft/yii2": ">=2.0.4", + "yiisoft/yii2": ">=2.0.6", "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*" }, "autoload": { -- libgit2 0.21.4