Commit bedb55feb8d8bec8bf3243469124d846e5880aab
1 parent
df629228
fixed Image class
Showing
26 changed files
with
357 additions
and
383 deletions
Show diff stats
common/components/parsers/CustomConverter.php
1 | <?php | 1 | <?php |
2 | -namespace backend\components\parsers; | 2 | +namespace common\components\parsers; |
3 | use common\components\CustomVarDamp; | 3 | use common\components\CustomVarDamp; |
4 | use yii\multiparser\Converter; | 4 | use yii\multiparser\Converter; |
5 | use backend\models\Details; | 5 | use backend\models\Details; |
common/components/parsers/CustomCsvParser.php
common/components/parsers/MailParser.php
composer.lock
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | - "hash": "8580bd82955b1fbb80d47024e184056e", | 7 | + "hash": "54588d810c5a77b1e177db18875540d1", |
8 | "packages": [ | 8 | "packages": [ |
9 | { | 9 | { |
10 | "name": "bower-asset/bootstrap", | 10 | "name": "bower-asset/bootstrap", |
@@ -317,6 +317,58 @@ | @@ -317,6 +317,58 @@ | ||
317 | "time": "2013-11-30 08:25:19" | 317 | "time": "2013-11-30 08:25:19" |
318 | }, | 318 | }, |
319 | { | 319 | { |
320 | + "name": "imagine/imagine", | ||
321 | + "version": "v0.5.0", | ||
322 | + "source": { | ||
323 | + "type": "git", | ||
324 | + "url": "https://github.com/avalanche123/Imagine.git", | ||
325 | + "reference": "f64ec666baaa800edcbf237db41121a569230709" | ||
326 | + }, | ||
327 | + "dist": { | ||
328 | + "type": "zip", | ||
329 | + "url": "https://api.github.com/repos/avalanche123/Imagine/zipball/f64ec666baaa800edcbf237db41121a569230709", | ||
330 | + "reference": "f64ec666baaa800edcbf237db41121a569230709", | ||
331 | + "shasum": "" | ||
332 | + }, | ||
333 | + "require": { | ||
334 | + "php": ">=5.3.2" | ||
335 | + }, | ||
336 | + "require-dev": { | ||
337 | + "sami/sami": "dev-master" | ||
338 | + }, | ||
339 | + "suggest": { | ||
340 | + "ext-gd": "to use the GD implementation", | ||
341 | + "ext-gmagick": "to use the Gmagick implementation", | ||
342 | + "ext-imagick": "to use the Imagick implementation" | ||
343 | + }, | ||
344 | + "type": "library", | ||
345 | + "autoload": { | ||
346 | + "psr-0": { | ||
347 | + "Imagine": "lib/" | ||
348 | + } | ||
349 | + }, | ||
350 | + "notification-url": "https://packagist.org/downloads/", | ||
351 | + "license": [ | ||
352 | + "MIT" | ||
353 | + ], | ||
354 | + "authors": [ | ||
355 | + { | ||
356 | + "name": "Bulat Shakirzyanov", | ||
357 | + "email": "mallluhuct@gmail.com", | ||
358 | + "homepage": "http://avalanche123.com" | ||
359 | + } | ||
360 | + ], | ||
361 | + "description": "Image processing for PHP 5.3", | ||
362 | + "homepage": "http://imagine.readthedocs.org/", | ||
363 | + "keywords": [ | ||
364 | + "drawing", | ||
365 | + "graphics", | ||
366 | + "image manipulation", | ||
367 | + "image processing" | ||
368 | + ], | ||
369 | + "time": "2013-07-10 17:25:36" | ||
370 | + }, | ||
371 | + { | ||
320 | "name": "swiftmailer/swiftmailer", | 372 | "name": "swiftmailer/swiftmailer", |
321 | "version": "v5.4.1", | 373 | "version": "v5.4.1", |
322 | "source": { | 374 | "source": { |
@@ -459,21 +511,21 @@ | @@ -459,21 +511,21 @@ | ||
459 | }, | 511 | }, |
460 | { | 512 | { |
461 | "name": "yiisoft/yii2-bootstrap", | 513 | "name": "yiisoft/yii2-bootstrap", |
462 | - "version": "2.0.4", | 514 | + "version": "2.0.5", |
463 | "source": { | 515 | "source": { |
464 | "type": "git", | 516 | "type": "git", |
465 | "url": "https://github.com/yiisoft/yii2-bootstrap.git", | 517 | "url": "https://github.com/yiisoft/yii2-bootstrap.git", |
466 | - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0" | 518 | + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923" |
467 | }, | 519 | }, |
468 | "dist": { | 520 | "dist": { |
469 | "type": "zip", | 521 | "type": "zip", |
470 | - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", | ||
471 | - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", | 522 | + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1464f93834b1d5edb1f5625f7ffd6c3723fa4923", |
523 | + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923", | ||
472 | "shasum": "" | 524 | "shasum": "" |
473 | }, | 525 | }, |
474 | "require": { | 526 | "require": { |
475 | "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", | 527 | "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", |
476 | - "yiisoft/yii2": ">=2.0.4" | 528 | + "yiisoft/yii2": ">=2.0.6" |
477 | }, | 529 | }, |
478 | "type": "yii2-extension", | 530 | "type": "yii2-extension", |
479 | "extra": { | 531 | "extra": { |
@@ -505,7 +557,7 @@ | @@ -505,7 +557,7 @@ | ||
505 | "bootstrap", | 557 | "bootstrap", |
506 | "yii2" | 558 | "yii2" |
507 | ], | 559 | ], |
508 | - "time": "2015-05-10 22:08:17" | 560 | + "time": "2015-09-23 17:48:24" |
509 | }, | 561 | }, |
510 | { | 562 | { |
511 | "name": "yiisoft/yii2-composer", | 563 | "name": "yiisoft/yii2-composer", |
@@ -555,6 +607,54 @@ | @@ -555,6 +607,54 @@ | ||
555 | "time": "2015-03-01 06:22:44" | 607 | "time": "2015-03-01 06:22:44" |
556 | }, | 608 | }, |
557 | { | 609 | { |
610 | + "name": "yiisoft/yii2-imagine", | ||
611 | + "version": "2.0.3", | ||
612 | + "source": { | ||
613 | + "type": "git", | ||
614 | + "url": "https://github.com/yiisoft/yii2-imagine.git", | ||
615 | + "reference": "0961343138b65bba447de84b2b300899617e6acc" | ||
616 | + }, | ||
617 | + "dist": { | ||
618 | + "type": "zip", | ||
619 | + "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/0961343138b65bba447de84b2b300899617e6acc", | ||
620 | + "reference": "0961343138b65bba447de84b2b300899617e6acc", | ||
621 | + "shasum": "" | ||
622 | + }, | ||
623 | + "require": { | ||
624 | + "imagine/imagine": "0.5.*", | ||
625 | + "yiisoft/yii2": "*" | ||
626 | + }, | ||
627 | + "type": "yii2-extension", | ||
628 | + "extra": { | ||
629 | + "branch-alias": { | ||
630 | + "dev-master": "2.0.x-dev" | ||
631 | + } | ||
632 | + }, | ||
633 | + "autoload": { | ||
634 | + "psr-4": { | ||
635 | + "yii\\imagine\\": "" | ||
636 | + } | ||
637 | + }, | ||
638 | + "notification-url": "https://packagist.org/downloads/", | ||
639 | + "license": [ | ||
640 | + "BSD-3-Clause" | ||
641 | + ], | ||
642 | + "authors": [ | ||
643 | + { | ||
644 | + "name": "Antonio Ramirez", | ||
645 | + "email": "amigo.cobos@gmail.com" | ||
646 | + } | ||
647 | + ], | ||
648 | + "description": "The Imagine integration for the Yii framework", | ||
649 | + "keywords": [ | ||
650 | + "helper", | ||
651 | + "image", | ||
652 | + "imagine", | ||
653 | + "yii2" | ||
654 | + ], | ||
655 | + "time": "2015-03-01 06:22:44" | ||
656 | + }, | ||
657 | + { | ||
558 | "name": "yiisoft/yii2-swiftmailer", | 658 | "name": "yiisoft/yii2-swiftmailer", |
559 | "version": "2.0.4", | 659 | "version": "2.0.4", |
560 | "source": { | 660 | "source": { |
@@ -634,101 +734,6 @@ | @@ -634,101 +734,6 @@ | ||
634 | } | 734 | } |
635 | }, | 735 | }, |
636 | { | 736 | { |
637 | - "name": "composer/installers", | ||
638 | - "version": "v1.0.21", | ||
639 | - "source": { | ||
640 | - "type": "git", | ||
641 | - "url": "https://github.com/composer/installers.git", | ||
642 | - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" | ||
643 | - }, | ||
644 | - "dist": { | ||
645 | - "type": "zip", | ||
646 | - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", | ||
647 | - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", | ||
648 | - "shasum": "" | ||
649 | - }, | ||
650 | - "replace": { | ||
651 | - "roundcube/plugin-installer": "*", | ||
652 | - "shama/baton": "*" | ||
653 | - }, | ||
654 | - "require-dev": { | ||
655 | - "composer/composer": "1.0.*@dev", | ||
656 | - "phpunit/phpunit": "4.1.*" | ||
657 | - }, | ||
658 | - "type": "composer-installer", | ||
659 | - "extra": { | ||
660 | - "class": "Composer\\Installers\\Installer", | ||
661 | - "branch-alias": { | ||
662 | - "dev-master": "1.0-dev" | ||
663 | - } | ||
664 | - }, | ||
665 | - "autoload": { | ||
666 | - "psr-0": { | ||
667 | - "Composer\\Installers\\": "src/" | ||
668 | - } | ||
669 | - }, | ||
670 | - "notification-url": "https://packagist.org/downloads/", | ||
671 | - "license": [ | ||
672 | - "MIT" | ||
673 | - ], | ||
674 | - "authors": [ | ||
675 | - { | ||
676 | - "name": "Kyle Robinson Young", | ||
677 | - "email": "kyle@dontkry.com", | ||
678 | - "homepage": "https://github.com/shama" | ||
679 | - } | ||
680 | - ], | ||
681 | - "description": "A multi-framework Composer library installer", | ||
682 | - "homepage": "http://composer.github.com/installers/", | ||
683 | - "keywords": [ | ||
684 | - "Craft", | ||
685 | - "Dolibarr", | ||
686 | - "Hurad", | ||
687 | - "MODX Evo", | ||
688 | - "OXID", | ||
689 | - "SMF", | ||
690 | - "Thelia", | ||
691 | - "WolfCMS", | ||
692 | - "agl", | ||
693 | - "aimeos", | ||
694 | - "annotatecms", | ||
695 | - "bitrix", | ||
696 | - "cakephp", | ||
697 | - "chef", | ||
698 | - "codeigniter", | ||
699 | - "concrete5", | ||
700 | - "croogo", | ||
701 | - "dokuwiki", | ||
702 | - "drupal", | ||
703 | - "elgg", | ||
704 | - "fuelphp", | ||
705 | - "grav", | ||
706 | - "installer", | ||
707 | - "joomla", | ||
708 | - "kohana", | ||
709 | - "laravel", | ||
710 | - "lithium", | ||
711 | - "magento", | ||
712 | - "mako", | ||
713 | - "mediawiki", | ||
714 | - "modulework", | ||
715 | - "moodle", | ||
716 | - "phpbb", | ||
717 | - "piwik", | ||
718 | - "ppi", | ||
719 | - "puppet", | ||
720 | - "roundcube", | ||
721 | - "shopware", | ||
722 | - "silverstripe", | ||
723 | - "symfony", | ||
724 | - "typo3", | ||
725 | - "wordpress", | ||
726 | - "zend", | ||
727 | - "zikula" | ||
728 | - ], | ||
729 | - "time": "2015-02-18 17:17:01" | ||
730 | - }, | ||
731 | - { | ||
732 | "name": "fzaninotto/faker", | 737 | "name": "fzaninotto/faker", |
733 | "version": "v1.5.0", | 738 | "version": "v1.5.0", |
734 | "source": { | 739 | "source": { |
@@ -815,55 +820,6 @@ | @@ -815,55 +820,6 @@ | ||
815 | "time": "2013-11-01 13:02:21" | 820 | "time": "2013-11-01 13:02:21" |
816 | }, | 821 | }, |
817 | { | 822 | { |
818 | - "name": "silverstripe/framework", | ||
819 | - "version": "3.1.13", | ||
820 | - "source": { | ||
821 | - "type": "git", | ||
822 | - "url": "https://github.com/silverstripe/silverstripe-framework.git", | ||
823 | - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be" | ||
824 | - }, | ||
825 | - "dist": { | ||
826 | - "type": "zip", | ||
827 | - "url": "https://api.github.com/repos/silverstripe/silverstripe-framework/zipball/04b803dfc6dc60f2e6a38fa74f957156230b54be", | ||
828 | - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be", | ||
829 | - "shasum": "" | ||
830 | - }, | ||
831 | - "require": { | ||
832 | - "composer/installers": "*", | ||
833 | - "php": ">=5.3.2" | ||
834 | - }, | ||
835 | - "require-dev": { | ||
836 | - "phpunit/phpunit": "~3.7@stable" | ||
837 | - }, | ||
838 | - "type": "silverstripe-module", | ||
839 | - "autoload": { | ||
840 | - "classmap": [ | ||
841 | - "tests/behat/features/bootstrap" | ||
842 | - ] | ||
843 | - }, | ||
844 | - "notification-url": "https://packagist.org/downloads/", | ||
845 | - "license": [ | ||
846 | - "BSD-3-Clause" | ||
847 | - ], | ||
848 | - "authors": [ | ||
849 | - { | ||
850 | - "name": "SilverStripe", | ||
851 | - "homepage": "http://silverstripe.com" | ||
852 | - }, | ||
853 | - { | ||
854 | - "name": "The SilverStripe Community", | ||
855 | - "homepage": "http://silverstripe.org" | ||
856 | - } | ||
857 | - ], | ||
858 | - "description": "The SilverStripe framework", | ||
859 | - "homepage": "http://silverstripe.org", | ||
860 | - "keywords": [ | ||
861 | - "framework", | ||
862 | - "silverstripe" | ||
863 | - ], | ||
864 | - "time": "2015-05-28 06:59:11" | ||
865 | - }, | ||
866 | - { | ||
867 | "name": "yiisoft/yii2-codeception", | 823 | "name": "yiisoft/yii2-codeception", |
868 | "version": "2.0.4", | 824 | "version": "2.0.4", |
869 | "source": { | 825 | "source": { |
vendor/composer/autoload_classmap.php
@@ -6,7 +6,4 @@ $vendorDir = dirname(dirname(__FILE__)); | @@ -6,7 +6,4 @@ $vendorDir = dirname(dirname(__FILE__)); | ||
6 | $baseDir = dirname($vendorDir); | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | ||
8 | return array( | 8 | return array( |
9 | - 'SilverStripe\\Framework\\Test\\Behaviour\\CmsFormsContext' => $baseDir . '/framework/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsFormsContext.php', | ||
10 | - 'SilverStripe\\Framework\\Test\\Behaviour\\CmsUiContext' => $baseDir . '/framework/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php', | ||
11 | - 'SilverStripe\\Framework\\Test\\Behaviour\\FeatureContext' => $baseDir . '/framework/tests/behat/features/bootstrap/FeatureContext.php', | ||
12 | ); | 9 | ); |
vendor/composer/autoload_namespaces.php
@@ -6,7 +6,7 @@ $vendorDir = dirname(dirname(__FILE__)); | @@ -6,7 +6,7 @@ $vendorDir = dirname(dirname(__FILE__)); | ||
6 | $baseDir = dirname($vendorDir); | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | ||
8 | return array( | 8 | return array( |
9 | + 'Imagine' => array($vendorDir . '/imagine/imagine/lib'), | ||
9 | 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), | 10 | 'HTMLPurifier' => array($vendorDir . '/ezyang/htmlpurifier/library'), |
10 | 'Diff' => array($vendorDir . '/phpspec/php-diff/lib'), | 11 | 'Diff' => array($vendorDir . '/phpspec/php-diff/lib'), |
11 | - 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src'), | ||
12 | ); | 12 | ); |
vendor/composer/autoload_psr4.php
@@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir); | @@ -7,7 +7,7 @@ $baseDir = dirname($vendorDir); | ||
7 | 7 | ||
8 | return array( | 8 | return array( |
9 | 'yii\\swiftmailer\\' => array($vendorDir . '/yiisoft/yii2-swiftmailer'), | 9 | 'yii\\swiftmailer\\' => array($vendorDir . '/yiisoft/yii2-swiftmailer'), |
10 | - 'yii\\multiparser\\' => array($vendorDir . '/yiisoft/multiparser'), | 10 | + 'yii\\imagine\\' => array($vendorDir . '/yiisoft/yii2-imagine'), |
11 | 'yii\\gii\\' => array($vendorDir . '/yiisoft/yii2-gii'), | 11 | 'yii\\gii\\' => array($vendorDir . '/yiisoft/yii2-gii'), |
12 | 'yii\\faker\\' => array($vendorDir . '/yiisoft/yii2-faker'), | 12 | 'yii\\faker\\' => array($vendorDir . '/yiisoft/yii2-faker'), |
13 | 'yii\\debug\\' => array($vendorDir . '/yiisoft/yii2-debug'), | 13 | 'yii\\debug\\' => array($vendorDir . '/yiisoft/yii2-debug'), |
vendor/composer/installed.json
@@ -617,58 +617,6 @@ | @@ -617,58 +617,6 @@ | ||
617 | ] | 617 | ] |
618 | }, | 618 | }, |
619 | { | 619 | { |
620 | - "name": "yiisoft/yii2-bootstrap", | ||
621 | - "version": "2.0.4", | ||
622 | - "version_normalized": "2.0.4.0", | ||
623 | - "source": { | ||
624 | - "type": "git", | ||
625 | - "url": "https://github.com/yiisoft/yii2-bootstrap.git", | ||
626 | - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0" | ||
627 | - }, | ||
628 | - "dist": { | ||
629 | - "type": "zip", | ||
630 | - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", | ||
631 | - "reference": "1b6b1e61cf91c3cdd517d6a7e71d30bb212e4af0", | ||
632 | - "shasum": "" | ||
633 | - }, | ||
634 | - "require": { | ||
635 | - "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", | ||
636 | - "yiisoft/yii2": ">=2.0.4" | ||
637 | - }, | ||
638 | - "time": "2015-05-10 22:08:17", | ||
639 | - "type": "yii2-extension", | ||
640 | - "extra": { | ||
641 | - "branch-alias": { | ||
642 | - "dev-master": "2.0.x-dev" | ||
643 | - }, | ||
644 | - "asset-installer-paths": { | ||
645 | - "npm-asset-library": "vendor/npm", | ||
646 | - "bower-asset-library": "vendor/bower" | ||
647 | - } | ||
648 | - }, | ||
649 | - "installation-source": "dist", | ||
650 | - "autoload": { | ||
651 | - "psr-4": { | ||
652 | - "yii\\bootstrap\\": "" | ||
653 | - } | ||
654 | - }, | ||
655 | - "notification-url": "https://packagist.org/downloads/", | ||
656 | - "license": [ | ||
657 | - "BSD-3-Clause" | ||
658 | - ], | ||
659 | - "authors": [ | ||
660 | - { | ||
661 | - "name": "Qiang Xue", | ||
662 | - "email": "qiang.xue@gmail.com" | ||
663 | - } | ||
664 | - ], | ||
665 | - "description": "The Twitter Bootstrap extension for the Yii framework", | ||
666 | - "keywords": [ | ||
667 | - "bootstrap", | ||
668 | - "yii2" | ||
669 | - ] | ||
670 | - }, | ||
671 | - { | ||
672 | "name": "bower-asset/typeahead.js", | 620 | "name": "bower-asset/typeahead.js", |
673 | "version": "v0.10.5", | 621 | "version": "v0.10.5", |
674 | "version_normalized": "0.10.5.0", | 622 | "version_normalized": "0.10.5.0", |
@@ -941,151 +889,159 @@ | @@ -941,151 +889,159 @@ | ||
941 | ] | 889 | ] |
942 | }, | 890 | }, |
943 | { | 891 | { |
944 | - "name": "composer/installers", | ||
945 | - "version": "v1.0.21", | ||
946 | - "version_normalized": "1.0.21.0", | 892 | + "name": "yiisoft/yii2-bootstrap", |
893 | + "version": "2.0.5", | ||
894 | + "version_normalized": "2.0.5.0", | ||
947 | "source": { | 895 | "source": { |
948 | "type": "git", | 896 | "type": "git", |
949 | - "url": "https://github.com/composer/installers.git", | ||
950 | - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45" | 897 | + "url": "https://github.com/yiisoft/yii2-bootstrap.git", |
898 | + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923" | ||
951 | }, | 899 | }, |
952 | "dist": { | 900 | "dist": { |
953 | "type": "zip", | 901 | "type": "zip", |
954 | - "url": "https://api.github.com/repos/composer/installers/zipball/d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", | ||
955 | - "reference": "d64e23fce42a4063d63262b19b8e7c0f3b5e4c45", | 902 | + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/1464f93834b1d5edb1f5625f7ffd6c3723fa4923", |
903 | + "reference": "1464f93834b1d5edb1f5625f7ffd6c3723fa4923", | ||
956 | "shasum": "" | 904 | "shasum": "" |
957 | }, | 905 | }, |
958 | - "replace": { | ||
959 | - "roundcube/plugin-installer": "*", | ||
960 | - "shama/baton": "*" | ||
961 | - }, | ||
962 | - "require-dev": { | ||
963 | - "composer/composer": "1.0.*@dev", | ||
964 | - "phpunit/phpunit": "4.1.*" | 906 | + "require": { |
907 | + "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", | ||
908 | + "yiisoft/yii2": ">=2.0.6" | ||
965 | }, | 909 | }, |
966 | - "time": "2015-02-18 17:17:01", | ||
967 | - "type": "composer-installer", | 910 | + "time": "2015-09-23 17:48:24", |
911 | + "type": "yii2-extension", | ||
968 | "extra": { | 912 | "extra": { |
969 | - "class": "Composer\\Installers\\Installer", | ||
970 | "branch-alias": { | 913 | "branch-alias": { |
971 | - "dev-master": "1.0-dev" | 914 | + "dev-master": "2.0.x-dev" |
915 | + }, | ||
916 | + "asset-installer-paths": { | ||
917 | + "npm-asset-library": "vendor/npm", | ||
918 | + "bower-asset-library": "vendor/bower" | ||
972 | } | 919 | } |
973 | }, | 920 | }, |
974 | "installation-source": "dist", | 921 | "installation-source": "dist", |
975 | "autoload": { | 922 | "autoload": { |
976 | - "psr-0": { | ||
977 | - "Composer\\Installers\\": "src/" | 923 | + "psr-4": { |
924 | + "yii\\bootstrap\\": "" | ||
978 | } | 925 | } |
979 | }, | 926 | }, |
980 | "notification-url": "https://packagist.org/downloads/", | 927 | "notification-url": "https://packagist.org/downloads/", |
981 | "license": [ | 928 | "license": [ |
982 | - "MIT" | 929 | + "BSD-3-Clause" |
983 | ], | 930 | ], |
984 | "authors": [ | 931 | "authors": [ |
985 | { | 932 | { |
986 | - "name": "Kyle Robinson Young", | ||
987 | - "email": "kyle@dontkry.com", | ||
988 | - "homepage": "https://github.com/shama" | 933 | + "name": "Qiang Xue", |
934 | + "email": "qiang.xue@gmail.com" | ||
989 | } | 935 | } |
990 | ], | 936 | ], |
991 | - "description": "A multi-framework Composer library installer", | ||
992 | - "homepage": "http://composer.github.com/installers/", | 937 | + "description": "The Twitter Bootstrap extension for the Yii framework", |
993 | "keywords": [ | 938 | "keywords": [ |
994 | - "Craft", | ||
995 | - "Dolibarr", | ||
996 | - "Hurad", | ||
997 | - "MODX Evo", | ||
998 | - "OXID", | ||
999 | - "SMF", | ||
1000 | - "Thelia", | ||
1001 | - "WolfCMS", | ||
1002 | - "agl", | ||
1003 | - "aimeos", | ||
1004 | - "annotatecms", | ||
1005 | - "bitrix", | ||
1006 | - "cakephp", | ||
1007 | - "chef", | ||
1008 | - "codeigniter", | ||
1009 | - "concrete5", | ||
1010 | - "croogo", | ||
1011 | - "dokuwiki", | ||
1012 | - "drupal", | ||
1013 | - "elgg", | ||
1014 | - "fuelphp", | ||
1015 | - "grav", | ||
1016 | - "installer", | ||
1017 | - "joomla", | ||
1018 | - "kohana", | ||
1019 | - "laravel", | ||
1020 | - "lithium", | ||
1021 | - "magento", | ||
1022 | - "mako", | ||
1023 | - "mediawiki", | ||
1024 | - "modulework", | ||
1025 | - "moodle", | ||
1026 | - "phpbb", | ||
1027 | - "piwik", | ||
1028 | - "ppi", | ||
1029 | - "puppet", | ||
1030 | - "roundcube", | ||
1031 | - "shopware", | ||
1032 | - "silverstripe", | ||
1033 | - "symfony", | ||
1034 | - "typo3", | ||
1035 | - "wordpress", | ||
1036 | - "zend", | ||
1037 | - "zikula" | 939 | + "bootstrap", |
940 | + "yii2" | ||
1038 | ] | 941 | ] |
1039 | }, | 942 | }, |
1040 | { | 943 | { |
1041 | - "name": "silverstripe/framework", | ||
1042 | - "version": "3.1.13", | ||
1043 | - "version_normalized": "3.1.13.0", | 944 | + "name": "imagine/imagine", |
945 | + "version": "v0.5.0", | ||
946 | + "version_normalized": "0.5.0.0", | ||
1044 | "source": { | 947 | "source": { |
1045 | "type": "git", | 948 | "type": "git", |
1046 | - "url": "https://github.com/silverstripe/silverstripe-framework.git", | ||
1047 | - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be" | 949 | + "url": "https://github.com/avalanche123/Imagine.git", |
950 | + "reference": "f64ec666baaa800edcbf237db41121a569230709" | ||
1048 | }, | 951 | }, |
1049 | "dist": { | 952 | "dist": { |
1050 | "type": "zip", | 953 | "type": "zip", |
1051 | - "url": "https://api.github.com/repos/silverstripe/silverstripe-framework/zipball/04b803dfc6dc60f2e6a38fa74f957156230b54be", | ||
1052 | - "reference": "04b803dfc6dc60f2e6a38fa74f957156230b54be", | 954 | + "url": "https://api.github.com/repos/avalanche123/Imagine/zipball/f64ec666baaa800edcbf237db41121a569230709", |
955 | + "reference": "f64ec666baaa800edcbf237db41121a569230709", | ||
1053 | "shasum": "" | 956 | "shasum": "" |
1054 | }, | 957 | }, |
1055 | "require": { | 958 | "require": { |
1056 | - "composer/installers": "*", | ||
1057 | "php": ">=5.3.2" | 959 | "php": ">=5.3.2" |
1058 | }, | 960 | }, |
1059 | "require-dev": { | 961 | "require-dev": { |
1060 | - "phpunit/phpunit": "~3.7@stable" | 962 | + "sami/sami": "dev-master" |
963 | + }, | ||
964 | + "suggest": { | ||
965 | + "ext-gd": "to use the GD implementation", | ||
966 | + "ext-gmagick": "to use the Gmagick implementation", | ||
967 | + "ext-imagick": "to use the Imagick implementation" | ||
1061 | }, | 968 | }, |
1062 | - "time": "2015-05-28 06:59:11", | ||
1063 | - "type": "silverstripe-module", | 969 | + "time": "2013-07-10 17:25:36", |
970 | + "type": "library", | ||
1064 | "installation-source": "dist", | 971 | "installation-source": "dist", |
1065 | "autoload": { | 972 | "autoload": { |
1066 | - "classmap": [ | ||
1067 | - "tests/behat/features/bootstrap" | ||
1068 | - ] | 973 | + "psr-0": { |
974 | + "Imagine": "lib/" | ||
975 | + } | ||
1069 | }, | 976 | }, |
1070 | "notification-url": "https://packagist.org/downloads/", | 977 | "notification-url": "https://packagist.org/downloads/", |
1071 | "license": [ | 978 | "license": [ |
1072 | - "BSD-3-Clause" | 979 | + "MIT" |
1073 | ], | 980 | ], |
1074 | "authors": [ | 981 | "authors": [ |
1075 | { | 982 | { |
1076 | - "name": "SilverStripe", | ||
1077 | - "homepage": "http://silverstripe.com" | ||
1078 | - }, | 983 | + "name": "Bulat Shakirzyanov", |
984 | + "email": "mallluhuct@gmail.com", | ||
985 | + "homepage": "http://avalanche123.com" | ||
986 | + } | ||
987 | + ], | ||
988 | + "description": "Image processing for PHP 5.3", | ||
989 | + "homepage": "http://imagine.readthedocs.org/", | ||
990 | + "keywords": [ | ||
991 | + "drawing", | ||
992 | + "graphics", | ||
993 | + "image manipulation", | ||
994 | + "image processing" | ||
995 | + ] | ||
996 | + }, | ||
997 | + { | ||
998 | + "name": "yiisoft/yii2-imagine", | ||
999 | + "version": "2.0.3", | ||
1000 | + "version_normalized": "2.0.3.0", | ||
1001 | + "source": { | ||
1002 | + "type": "git", | ||
1003 | + "url": "https://github.com/yiisoft/yii2-imagine.git", | ||
1004 | + "reference": "0961343138b65bba447de84b2b300899617e6acc" | ||
1005 | + }, | ||
1006 | + "dist": { | ||
1007 | + "type": "zip", | ||
1008 | + "url": "https://api.github.com/repos/yiisoft/yii2-imagine/zipball/0961343138b65bba447de84b2b300899617e6acc", | ||
1009 | + "reference": "0961343138b65bba447de84b2b300899617e6acc", | ||
1010 | + "shasum": "" | ||
1011 | + }, | ||
1012 | + "require": { | ||
1013 | + "imagine/imagine": "0.5.*", | ||
1014 | + "yiisoft/yii2": "*" | ||
1015 | + }, | ||
1016 | + "time": "2015-03-01 06:22:44", | ||
1017 | + "type": "yii2-extension", | ||
1018 | + "extra": { | ||
1019 | + "branch-alias": { | ||
1020 | + "dev-master": "2.0.x-dev" | ||
1021 | + } | ||
1022 | + }, | ||
1023 | + "installation-source": "dist", | ||
1024 | + "autoload": { | ||
1025 | + "psr-4": { | ||
1026 | + "yii\\imagine\\": "" | ||
1027 | + } | ||
1028 | + }, | ||
1029 | + "notification-url": "https://packagist.org/downloads/", | ||
1030 | + "license": [ | ||
1031 | + "BSD-3-Clause" | ||
1032 | + ], | ||
1033 | + "authors": [ | ||
1079 | { | 1034 | { |
1080 | - "name": "The SilverStripe Community", | ||
1081 | - "homepage": "http://silverstripe.org" | 1035 | + "name": "Antonio Ramirez", |
1036 | + "email": "amigo.cobos@gmail.com" | ||
1082 | } | 1037 | } |
1083 | ], | 1038 | ], |
1084 | - "description": "The SilverStripe framework", | ||
1085 | - "homepage": "http://silverstripe.org", | 1039 | + "description": "The Imagine integration for the Yii framework", |
1086 | "keywords": [ | 1040 | "keywords": [ |
1087 | - "framework", | ||
1088 | - "silverstripe" | 1041 | + "helper", |
1042 | + "image", | ||
1043 | + "imagine", | ||
1044 | + "yii2" | ||
1089 | ] | 1045 | ] |
1090 | } | 1046 | } |
1091 | ] | 1047 | ] |
vendor/yiisoft/extensions.php
@@ -12,11 +12,11 @@ return array ( | @@ -12,11 +12,11 @@ return array ( | ||
12 | '@yii/swiftmailer' => $vendorDir . '/yiisoft/yii2-swiftmailer', | 12 | '@yii/swiftmailer' => $vendorDir . '/yiisoft/yii2-swiftmailer', |
13 | ), | 13 | ), |
14 | ), | 14 | ), |
15 | - 'yiisoft/yii2-multiparser' => | 15 | + 'yiisoft/yii2-multiparser' => |
16 | array ( | 16 | array ( |
17 | 'name' => 'yiisoft/multiparser', | 17 | 'name' => 'yiisoft/multiparser', |
18 | 'version' => '1.0', | 18 | 'version' => '1.0', |
19 | - 'alias' => | 19 | + 'alias' => |
20 | array ( | 20 | array ( |
21 | '@yii/multiparser' => $vendorDir . '/yiisoft/multiparser', | 21 | '@yii/multiparser' => $vendorDir . '/yiisoft/multiparser', |
22 | ), | 22 | ), |
@@ -30,15 +30,6 @@ return array ( | @@ -30,15 +30,6 @@ return array ( | ||
30 | '@yii/codeception' => $vendorDir . '/yiisoft/yii2-codeception', | 30 | '@yii/codeception' => $vendorDir . '/yiisoft/yii2-codeception', |
31 | ), | 31 | ), |
32 | ), | 32 | ), |
33 | - 'yiisoft/yii2-bootstrap' => | ||
34 | - array ( | ||
35 | - 'name' => 'yiisoft/yii2-bootstrap', | ||
36 | - 'version' => '2.0.4.0', | ||
37 | - 'alias' => | ||
38 | - array ( | ||
39 | - '@yii/bootstrap' => $vendorDir . '/yiisoft/yii2-bootstrap', | ||
40 | - ), | ||
41 | - ), | ||
42 | 'yiisoft/yii2-gii' => | 33 | 'yiisoft/yii2-gii' => |
43 | array ( | 34 | array ( |
44 | 'name' => 'yiisoft/yii2-gii', | 35 | 'name' => 'yiisoft/yii2-gii', |
@@ -66,4 +57,22 @@ return array ( | @@ -66,4 +57,22 @@ return array ( | ||
66 | '@yii/debug' => $vendorDir . '/yiisoft/yii2-debug', | 57 | '@yii/debug' => $vendorDir . '/yiisoft/yii2-debug', |
67 | ), | 58 | ), |
68 | ), | 59 | ), |
60 | + 'yiisoft/yii2-bootstrap' => | ||
61 | + array ( | ||
62 | + 'name' => 'yiisoft/yii2-bootstrap', | ||
63 | + 'version' => '2.0.5.0', | ||
64 | + 'alias' => | ||
65 | + array ( | ||
66 | + '@yii/bootstrap' => $vendorDir . '/yiisoft/yii2-bootstrap', | ||
67 | + ), | ||
68 | + ), | ||
69 | + 'yiisoft/yii2-imagine' => | ||
70 | + array ( | ||
71 | + 'name' => 'yiisoft/yii2-imagine', | ||
72 | + 'version' => '2.0.3.0', | ||
73 | + 'alias' => | ||
74 | + array ( | ||
75 | + '@yii/imagine' => $vendorDir . '/yiisoft/yii2-imagine', | ||
76 | + ), | ||
77 | + ), | ||
69 | ); | 78 | ); |
vendor/yiisoft/yii2-bootstrap/ActiveField.php
@@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
7 | 7 | ||
8 | namespace yii\bootstrap; | 8 | namespace yii\bootstrap; |
9 | 9 | ||
10 | -use yii\helpers\Html; | ||
11 | use yii\helpers\ArrayHelper; | 10 | use yii\helpers\ArrayHelper; |
12 | 11 | ||
13 | /** | 12 | /** |
@@ -291,6 +290,24 @@ class ActiveField extends \yii\widgets\ActiveField | @@ -291,6 +290,24 @@ class ActiveField extends \yii\widgets\ActiveField | ||
291 | } | 290 | } |
292 | 291 | ||
293 | /** | 292 | /** |
293 | + * Renders Bootstrap static form control. | ||
294 | + * @param array $options the tag options in terms of name-value pairs. These will be rendered as | ||
295 | + * the attributes of the resulting tag. There are also a special options: | ||
296 | + * | ||
297 | + * - encode: boolean, whether value should be HTML-encoded or not. | ||
298 | + * | ||
299 | + * @return $this the field object itself | ||
300 | + * @since 2.0.5 | ||
301 | + * @see http://getbootstrap.com/css/#forms-controls-static | ||
302 | + */ | ||
303 | + public function staticControl($options = []) | ||
304 | + { | ||
305 | + $this->adjustLabelFor($options); | ||
306 | + $this->parts['{input}'] = Html::activeStaticControl($this->model, $this->attribute, $options); | ||
307 | + return $this; | ||
308 | + } | ||
309 | + | ||
310 | + /** | ||
294 | * @inheritdoc | 311 | * @inheritdoc |
295 | */ | 312 | */ |
296 | public function label($label = null, $options = []) | 313 | public function label($label = null, $options = []) |
@@ -310,7 +327,7 @@ class ActiveField extends \yii\widgets\ActiveField | @@ -310,7 +327,7 @@ class ActiveField extends \yii\widgets\ActiveField | ||
310 | 327 | ||
311 | /** | 328 | /** |
312 | * @param boolean $value whether to render a inline list | 329 | * @param boolean $value whether to render a inline list |
313 | - * @return static the field object itself | 330 | + * @return $this the field object itself |
314 | * Make sure you call this method before [[checkboxList()]] or [[radioList()]] to have any effect. | 331 | * Make sure you call this method before [[checkboxList()]] or [[radioList()]] to have any effect. |
315 | */ | 332 | */ |
316 | public function inline($value = true) | 333 | public function inline($value = true) |
vendor/yiisoft/yii2-bootstrap/ActiveForm.php
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | namespace yii\bootstrap; | 8 | namespace yii\bootstrap; |
9 | 9 | ||
10 | use Yii; | 10 | use Yii; |
11 | -use yii\helpers\Html; | ||
12 | use yii\base\InvalidConfigException; | 11 | use yii\base\InvalidConfigException; |
13 | 12 | ||
14 | /** | 13 | /** |
@@ -98,4 +97,13 @@ class ActiveForm extends \yii\widgets\ActiveForm | @@ -98,4 +97,13 @@ class ActiveForm extends \yii\widgets\ActiveForm | ||
98 | } | 97 | } |
99 | parent::init(); | 98 | parent::init(); |
100 | } | 99 | } |
100 | + | ||
101 | + /** | ||
102 | + * @inheritdoc | ||
103 | + * @return ActiveField the created ActiveField object | ||
104 | + */ | ||
105 | + public function field($model, $attribute, $options = []) | ||
106 | + { | ||
107 | + return parent::field($model, $attribute, $options); | ||
108 | + } | ||
101 | } | 109 | } |
vendor/yiisoft/yii2-bootstrap/Alert.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use Yii; | 10 | use Yii; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Alert renders an alert bootstrap component. | 14 | * Alert renders an alert bootstrap component. |
@@ -136,9 +135,7 @@ class Alert extends Widget | @@ -136,9 +135,7 @@ class Alert extends Widget | ||
136 | */ | 135 | */ |
137 | protected function initOptions() | 136 | protected function initOptions() |
138 | { | 137 | { |
139 | - Html::addCssClass($this->options, 'alert'); | ||
140 | - Html::addCssClass($this->options, 'fade'); | ||
141 | - Html::addCssClass($this->options, 'in'); | 138 | + Html::addCssClass($this->options, ['alert', 'fade', 'in']); |
142 | 139 | ||
143 | if ($this->closeButton !== false) { | 140 | if ($this->closeButton !== false) { |
144 | $this->closeButton = array_merge([ | 141 | $this->closeButton = array_merge([ |
vendor/yiisoft/yii2-bootstrap/Button.php
@@ -7,8 +7,6 @@ | @@ -7,8 +7,6 @@ | ||
7 | 7 | ||
8 | namespace yii\bootstrap; | 8 | namespace yii\bootstrap; |
9 | 9 | ||
10 | -use yii\helpers\Html; | ||
11 | - | ||
12 | /** | 10 | /** |
13 | * Button renders a bootstrap button. | 11 | * Button renders a bootstrap button. |
14 | * | 12 | * |
@@ -48,7 +46,7 @@ class Button extends Widget | @@ -48,7 +46,7 @@ class Button extends Widget | ||
48 | { | 46 | { |
49 | parent::init(); | 47 | parent::init(); |
50 | $this->clientOptions = false; | 48 | $this->clientOptions = false; |
51 | - Html::addCssClass($this->options, 'btn'); | 49 | + Html::addCssClass($this->options, ['widget' => 'btn']); |
52 | } | 50 | } |
53 | 51 | ||
54 | /** | 52 | /** |
vendor/yiisoft/yii2-bootstrap/ButtonDropdown.php
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | namespace yii\bootstrap; | 8 | namespace yii\bootstrap; |
9 | 9 | ||
10 | use yii\helpers\ArrayHelper; | 10 | use yii\helpers\ArrayHelper; |
11 | -use yii\helpers\Html; | ||
12 | 11 | ||
13 | /** | 12 | /** |
14 | * ButtonDropdown renders a group or split button dropdown bootstrap component. | 13 | * ButtonDropdown renders a group or split button dropdown bootstrap component. |
@@ -75,7 +74,8 @@ class ButtonDropdown extends Widget | @@ -75,7 +74,8 @@ class ButtonDropdown extends Widget | ||
75 | */ | 74 | */ |
76 | public function run() | 75 | public function run() |
77 | { | 76 | { |
78 | - Html::addCssClass($this->containerOptions, 'btn-group'); | 77 | + // @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release |
78 | + Html::addCssClass($this->containerOptions, ['widget' => 'btn-group']); | ||
79 | $options = $this->containerOptions; | 79 | $options = $this->containerOptions; |
80 | $tag = ArrayHelper::remove($options, 'tag', 'div'); | 80 | $tag = ArrayHelper::remove($options, 'tag', 'div'); |
81 | 81 | ||
@@ -94,7 +94,7 @@ class ButtonDropdown extends Widget | @@ -94,7 +94,7 @@ class ButtonDropdown extends Widget | ||
94 | */ | 94 | */ |
95 | protected function renderButton() | 95 | protected function renderButton() |
96 | { | 96 | { |
97 | - Html::addCssClass($this->options, 'btn'); | 97 | + Html::addCssClass($this->options, ['widget' => 'btn']); |
98 | $label = $this->label; | 98 | $label = $this->label; |
99 | if ($this->encodeLabel) { | 99 | if ($this->encodeLabel) { |
100 | $label = Html::encode($label); | 100 | $label = Html::encode($label); |
@@ -102,7 +102,8 @@ class ButtonDropdown extends Widget | @@ -102,7 +102,8 @@ class ButtonDropdown extends Widget | ||
102 | if ($this->split) { | 102 | if ($this->split) { |
103 | $options = $this->options; | 103 | $options = $this->options; |
104 | $this->options['data-toggle'] = 'dropdown'; | 104 | $this->options['data-toggle'] = 'dropdown'; |
105 | - Html::addCssClass($this->options, 'dropdown-toggle'); | 105 | + Html::addCssClass($this->options, ['toggle' => 'dropdown-toggle']); |
106 | + unset($this->options['id']); | ||
106 | $splitButton = Button::widget([ | 107 | $splitButton = Button::widget([ |
107 | 'label' => '<span class="caret"></span>', | 108 | 'label' => '<span class="caret"></span>', |
108 | 'encodeLabel' => false, | 109 | 'encodeLabel' => false, |
@@ -115,7 +116,7 @@ class ButtonDropdown extends Widget | @@ -115,7 +116,7 @@ class ButtonDropdown extends Widget | ||
115 | if (!isset($options['href'])) { | 116 | if (!isset($options['href'])) { |
116 | $options['href'] = '#'; | 117 | $options['href'] = '#'; |
117 | } | 118 | } |
118 | - Html::addCssClass($options, 'dropdown-toggle'); | 119 | + Html::addCssClass($options, ['toggle' => 'dropdown-toggle']); |
119 | $options['data-toggle'] = 'dropdown'; | 120 | $options['data-toggle'] = 'dropdown'; |
120 | $splitButton = ''; | 121 | $splitButton = ''; |
121 | } | 122 | } |
vendor/yiisoft/yii2-bootstrap/ButtonGroup.php
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | namespace yii\bootstrap; | 8 | namespace yii\bootstrap; |
9 | 9 | ||
10 | use yii\helpers\ArrayHelper; | 10 | use yii\helpers\ArrayHelper; |
11 | -use yii\helpers\Html; | ||
12 | 11 | ||
13 | /** | 12 | /** |
14 | * ButtonGroup renders a button group bootstrap component. | 13 | * ButtonGroup renders a button group bootstrap component. |
@@ -66,7 +65,7 @@ class ButtonGroup extends Widget | @@ -66,7 +65,7 @@ class ButtonGroup extends Widget | ||
66 | public function init() | 65 | public function init() |
67 | { | 66 | { |
68 | parent::init(); | 67 | parent::init(); |
69 | - Html::addCssClass($this->options, 'btn-group'); | 68 | + Html::addCssClass($this->options, ['widget' => 'btn-group']); |
70 | } | 69 | } |
71 | 70 | ||
72 | /** | 71 | /** |
vendor/yiisoft/yii2-bootstrap/CHANGELOG.md
1 | Yii Framework 2 bootstrap extension Change Log | 1 | Yii Framework 2 bootstrap extension Change Log |
2 | ============================================== | 2 | ============================================== |
3 | 3 | ||
4 | -2.0.4 under development | ||
5 | ------------------------ | 4 | +2.0.5 September 23, 2015 |
5 | +------------------------ | ||
6 | + | ||
7 | +- Enh #15: Allowed overriding default Bootstrap CSS classes added by widgets (klimov-paul) | ||
8 | +- Enh #38: Added object support for `content` option in `Collapse` class (pana1990, ItsReddi) | ||
9 | +- Enh #40: Added `visible` option to `yii\bootstrap\Tab` widget items (klimov-paul) | ||
10 | +- Enh #41: Added `submenuOptions` support at `yii\bootstrap\Dropdown` (spikyjt, klimov-paul) | ||
11 | +- Enh #42: Added support for the glyphicons via `yii\bootstrap\Html::icon()` (klimov-paul) | ||
12 | +- Enh #43: Added support for the static form controls via `yii\bootstrap\Html` (klimov-paul) | ||
13 | +- Enh #44: Fixed `yii\bootstrap\ButtonDropdown` renders two buttons with the same id, if 'split' is enabled (klimov-paul) | ||
14 | +- Enh #50: Added `dropDownOptions` that is passed to `yii\bootstrap\Nav` dropdown items (fbau123) | ||
15 | + | ||
16 | + | ||
17 | +2.0.4 May 10, 2015 | ||
18 | +------------------ | ||
6 | 19 | ||
7 | - Bug #18: `label` option ignored by `yii\bootstrap\Activefield::checkbox()` and `yii\bootstrap\Activefield::radio()` (mikehaertl) | 20 | - Bug #18: `label` option ignored by `yii\bootstrap\Activefield::checkbox()` and `yii\bootstrap\Activefield::radio()` (mikehaertl) |
8 | - Bug #5984: `yii\bootstrap\Activefield::checkbox()` caused browser to link label to the wrong input (cebe) | 21 | - Bug #5984: `yii\bootstrap\Activefield::checkbox()` caused browser to link label to the wrong input (cebe) |
vendor/yiisoft/yii2-bootstrap/Carousel.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use yii\base\InvalidConfigException; | 10 | use yii\base\InvalidConfigException; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Carousel renders a carousel bootstrap javascript component. | 14 | * Carousel renders a carousel bootstrap javascript component. |
@@ -73,7 +72,7 @@ class Carousel extends Widget | @@ -73,7 +72,7 @@ class Carousel extends Widget | ||
73 | public function init() | 72 | public function init() |
74 | { | 73 | { |
75 | parent::init(); | 74 | parent::init(); |
76 | - Html::addCssClass($this->options, 'carousel'); | 75 | + Html::addCssClass($this->options, ['widget' => 'carousel']); |
77 | } | 76 | } |
78 | 77 | ||
79 | /** | 78 | /** |
@@ -150,7 +149,7 @@ class Carousel extends Widget | @@ -150,7 +149,7 @@ class Carousel extends Widget | ||
150 | throw new InvalidConfigException('The "content" option is required.'); | 149 | throw new InvalidConfigException('The "content" option is required.'); |
151 | } | 150 | } |
152 | 151 | ||
153 | - Html::addCssClass($options, 'item'); | 152 | + Html::addCssClass($options, ['widget' => 'item']); |
154 | if ($index === 0) { | 153 | if ($index === 0) { |
155 | Html::addCssClass($options, 'active'); | 154 | Html::addCssClass($options, 'active'); |
156 | } | 155 | } |
vendor/yiisoft/yii2-bootstrap/Collapse.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use yii\base\InvalidConfigException; | 10 | use yii\base\InvalidConfigException; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Collapse renders an accordion bootstrap javascript component. | 14 | * Collapse renders an accordion bootstrap javascript component. |
@@ -61,12 +60,11 @@ class Collapse extends Widget | @@ -61,12 +60,11 @@ class Collapse extends Widget | ||
61 | * - label: string, required, the group header label. | 60 | * - label: string, required, the group header label. |
62 | * - encode: boolean, optional, whether this label should be HTML-encoded. This param will override | 61 | * - encode: boolean, optional, whether this label should be HTML-encoded. This param will override |
63 | * global `$this->encodeLabels` param. | 62 | * global `$this->encodeLabels` param. |
64 | - * - content: array|string, required, the content (HTML) of the group | 63 | + * - content: array|string|object, required, the content (HTML) of the group |
65 | * - options: array, optional, the HTML attributes of the group | 64 | * - options: array, optional, the HTML attributes of the group |
66 | * - contentOptions: optional, the HTML attributes of the group's content | 65 | * - contentOptions: optional, the HTML attributes of the group's content |
67 | */ | 66 | */ |
68 | public $items = []; | 67 | public $items = []; |
69 | - | ||
70 | /** | 68 | /** |
71 | * @var boolean whether the labels for header items should be HTML-encoded. | 69 | * @var boolean whether the labels for header items should be HTML-encoded. |
72 | */ | 70 | */ |
@@ -79,7 +77,7 @@ class Collapse extends Widget | @@ -79,7 +77,7 @@ class Collapse extends Widget | ||
79 | public function init() | 77 | public function init() |
80 | { | 78 | { |
81 | parent::init(); | 79 | parent::init(); |
82 | - Html::addCssClass($this->options, 'panel-group'); | 80 | + Html::addCssClass($this->options, ['widget' => 'panel-group']); |
83 | } | 81 | } |
84 | 82 | ||
85 | /** | 83 | /** |
@@ -110,7 +108,7 @@ class Collapse extends Widget | @@ -110,7 +108,7 @@ class Collapse extends Widget | ||
110 | } | 108 | } |
111 | $header = $item['label']; | 109 | $header = $item['label']; |
112 | $options = ArrayHelper::getValue($item, 'options', []); | 110 | $options = ArrayHelper::getValue($item, 'options', []); |
113 | - Html::addCssClass($options, 'panel panel-default'); | 111 | + Html::addCssClass($options, ['panel' => 'panel', 'widget' => 'panel-default']); |
114 | $items[] = Html::tag('div', $this->renderItem($header, $item, ++$index), $options); | 112 | $items[] = Html::tag('div', $this->renderItem($header, $item, ++$index), $options); |
115 | } | 113 | } |
116 | 114 | ||
@@ -131,7 +129,7 @@ class Collapse extends Widget | @@ -131,7 +129,7 @@ class Collapse extends Widget | ||
131 | $id = $this->options['id'] . '-collapse' . $index; | 129 | $id = $this->options['id'] . '-collapse' . $index; |
132 | $options = ArrayHelper::getValue($item, 'contentOptions', []); | 130 | $options = ArrayHelper::getValue($item, 'contentOptions', []); |
133 | $options['id'] = $id; | 131 | $options['id'] = $id; |
134 | - Html::addCssClass($options, 'panel-collapse collapse'); | 132 | + Html::addCssClass($options, ['widget' => 'panel-collapse', 'collapse' => 'collapse']); |
135 | 133 | ||
136 | $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; | 134 | $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; |
137 | if ($encodeLabel) { | 135 | if ($encodeLabel) { |
@@ -146,7 +144,7 @@ class Collapse extends Widget | @@ -146,7 +144,7 @@ class Collapse extends Widget | ||
146 | 144 | ||
147 | $header = Html::tag('h4', $headerToggle, ['class' => 'panel-title']); | 145 | $header = Html::tag('h4', $headerToggle, ['class' => 'panel-title']); |
148 | 146 | ||
149 | - if (is_string($item['content'])) { | 147 | + if (is_string($item['content']) || is_object($item['content'])) { |
150 | $content = Html::tag('div', $item['content'], ['class' => 'panel-body']) . "\n"; | 148 | $content = Html::tag('div', $item['content'], ['class' => 'panel-body']) . "\n"; |
151 | } elseif (is_array($item['content'])) { | 149 | } elseif (is_array($item['content'])) { |
152 | $content = Html::ul($item['content'], [ | 150 | $content = Html::ul($item['content'], [ |
@@ -160,7 +158,7 @@ class Collapse extends Widget | @@ -160,7 +158,7 @@ class Collapse extends Widget | ||
160 | $content .= Html::tag('div', $item['footer'], ['class' => 'panel-footer']) . "\n"; | 158 | $content .= Html::tag('div', $item['footer'], ['class' => 'panel-footer']) . "\n"; |
161 | } | 159 | } |
162 | } else { | 160 | } else { |
163 | - throw new InvalidConfigException('The "content" option should be a string or array.'); | 161 | + throw new InvalidConfigException('The "content" option should be a string, array or object.'); |
164 | } | 162 | } |
165 | } else { | 163 | } else { |
166 | throw new InvalidConfigException('The "content" option is required.'); | 164 | throw new InvalidConfigException('The "content" option is required.'); |
vendor/yiisoft/yii2-bootstrap/Dropdown.php
@@ -9,8 +9,6 @@ namespace yii\bootstrap; | @@ -9,8 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use yii\base\InvalidConfigException; | 10 | use yii\base\InvalidConfigException; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | -use yii\helpers\Url; | ||
14 | 12 | ||
15 | /** | 13 | /** |
16 | * Dropdown renders a Bootstrap dropdown menu component. | 14 | * Dropdown renders a Bootstrap dropdown menu component. |
@@ -48,6 +46,8 @@ class Dropdown extends Widget | @@ -48,6 +46,8 @@ class Dropdown extends Widget | ||
48 | * - options: array, optional, the HTML attributes of the item. | 46 | * - options: array, optional, the HTML attributes of the item. |
49 | * - items: array, optional, the submenu items. The structure is the same as this property. | 47 | * - items: array, optional, the submenu items. The structure is the same as this property. |
50 | * Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it. | 48 | * Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it. |
49 | + * - submenuOptions: array, optional, the HTML attributes for sub-menu container tag. If specified it will be | ||
50 | + * merged with [[submenuOptions]]. | ||
51 | * | 51 | * |
52 | * To insert divider use `<li role="presentation" class="divider"></li>`. | 52 | * To insert divider use `<li role="presentation" class="divider"></li>`. |
53 | */ | 53 | */ |
@@ -56,6 +56,12 @@ class Dropdown extends Widget | @@ -56,6 +56,12 @@ class Dropdown extends Widget | ||
56 | * @var boolean whether the labels for header items should be HTML-encoded. | 56 | * @var boolean whether the labels for header items should be HTML-encoded. |
57 | */ | 57 | */ |
58 | public $encodeLabels = true; | 58 | public $encodeLabels = true; |
59 | + /** | ||
60 | + * @var array|null the HTML attributes for sub-menu container tags. | ||
61 | + * If not set - [[options]] value will be used for it. | ||
62 | + * @since 2.0.5 | ||
63 | + */ | ||
64 | + public $submenuOptions; | ||
59 | 65 | ||
60 | 66 | ||
61 | /** | 67 | /** |
@@ -64,8 +70,14 @@ class Dropdown extends Widget | @@ -64,8 +70,14 @@ class Dropdown extends Widget | ||
64 | */ | 70 | */ |
65 | public function init() | 71 | public function init() |
66 | { | 72 | { |
73 | + if ($this->submenuOptions === null) { | ||
74 | + // copying of [[options]] kept for BC | ||
75 | + // @todo separate [[submenuOptions]] from [[options]] completely before 2.1 release | ||
76 | + $this->submenuOptions = $this->options; | ||
77 | + unset($this->submenuOptions['id']); | ||
78 | + } | ||
67 | parent::init(); | 79 | parent::init(); |
68 | - Html::addCssClass($this->options, 'dropdown-menu'); | 80 | + Html::addCssClass($this->options, ['widget' => 'dropdown-menu']); |
69 | } | 81 | } |
70 | 82 | ||
71 | /** | 83 | /** |
@@ -88,7 +100,7 @@ class Dropdown extends Widget | @@ -88,7 +100,7 @@ class Dropdown extends Widget | ||
88 | protected function renderItems($items, $options = []) | 100 | protected function renderItems($items, $options = []) |
89 | { | 101 | { |
90 | $lines = []; | 102 | $lines = []; |
91 | - foreach ($items as $i => $item) { | 103 | + foreach ($items as $item) { |
92 | if (isset($item['visible']) && !$item['visible']) { | 104 | if (isset($item['visible']) && !$item['visible']) { |
93 | continue; | 105 | continue; |
94 | } | 106 | } |
@@ -108,16 +120,18 @@ class Dropdown extends Widget | @@ -108,16 +120,18 @@ class Dropdown extends Widget | ||
108 | if (empty($item['items'])) { | 120 | if (empty($item['items'])) { |
109 | if ($url === null) { | 121 | if ($url === null) { |
110 | $content = $label; | 122 | $content = $label; |
111 | - Html::addCssClass($itemOptions, 'dropdown-header'); | 123 | + Html::addCssClass($itemOptions, ['widget' => 'dropdown-header']); |
112 | } else { | 124 | } else { |
113 | $content = Html::a($label, $url, $linkOptions); | 125 | $content = Html::a($label, $url, $linkOptions); |
114 | } | 126 | } |
115 | } else { | 127 | } else { |
116 | - $submenuOptions = $options; | ||
117 | - unset($submenuOptions['id']); | 128 | + $submenuOptions = $this->submenuOptions; |
129 | + if (isset($item['submenuOptions'])) { | ||
130 | + $submenuOptions = array_merge($submenuOptions, $item['submenuOptions']); | ||
131 | + } | ||
118 | $content = Html::a($label, $url === null ? '#' : $url, $linkOptions) | 132 | $content = Html::a($label, $url === null ? '#' : $url, $linkOptions) |
119 | . $this->renderItems($item['items'], $submenuOptions); | 133 | . $this->renderItems($item['items'], $submenuOptions); |
120 | - Html::addCssClass($itemOptions, 'dropdown-submenu'); | 134 | + Html::addCssClass($itemOptions, ['widget' => 'dropdown-submenu']); |
121 | } | 135 | } |
122 | 136 | ||
123 | $lines[] = Html::tag('li', $content, $itemOptions); | 137 | $lines[] = Html::tag('li', $content, $itemOptions); |
vendor/yiisoft/yii2-bootstrap/Modal.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use Yii; | 10 | use Yii; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Modal renders a modal window that can be toggled by clicking on a button. | 14 | * Modal renders a modal window that can be toggled by clicking on a button. |
@@ -137,7 +136,7 @@ class Modal extends Widget | @@ -137,7 +136,7 @@ class Modal extends Widget | ||
137 | $this->header = $button . "\n" . $this->header; | 136 | $this->header = $button . "\n" . $this->header; |
138 | } | 137 | } |
139 | if ($this->header !== null) { | 138 | if ($this->header !== null) { |
140 | - Html::addCssClass($this->headerOptions, 'modal-header'); | 139 | + Html::addCssClass($this->headerOptions, ['widget' => 'modal-header']); |
141 | return Html::tag('div', "\n" . $this->header . "\n", $this->headerOptions); | 140 | return Html::tag('div', "\n" . $this->header . "\n", $this->headerOptions); |
142 | } else { | 141 | } else { |
143 | return null; | 142 | return null; |
@@ -169,7 +168,7 @@ class Modal extends Widget | @@ -169,7 +168,7 @@ class Modal extends Widget | ||
169 | protected function renderFooter() | 168 | protected function renderFooter() |
170 | { | 169 | { |
171 | if ($this->footer !== null) { | 170 | if ($this->footer !== null) { |
172 | - Html::addCssClass($this->footerOptions, 'modal-footer'); | 171 | + Html::addCssClass($this->footerOptions, ['widget' => 'modal-footer']); |
173 | return Html::tag('div', "\n" . $this->footer . "\n", $this->footerOptions); | 172 | return Html::tag('div', "\n" . $this->footer . "\n", $this->footerOptions); |
174 | } else { | 173 | } else { |
175 | return null; | 174 | return null; |
@@ -225,7 +224,7 @@ class Modal extends Widget | @@ -225,7 +224,7 @@ class Modal extends Widget | ||
225 | 'role' => 'dialog', | 224 | 'role' => 'dialog', |
226 | 'tabindex' => -1, | 225 | 'tabindex' => -1, |
227 | ], $this->options); | 226 | ], $this->options); |
228 | - Html::addCssClass($this->options, 'modal'); | 227 | + Html::addCssClass($this->options, ['widget' => 'modal']); |
229 | 228 | ||
230 | if ($this->clientOptions !== false) { | 229 | if ($this->clientOptions !== false) { |
231 | $this->clientOptions = array_merge(['show' => false], $this->clientOptions); | 230 | $this->clientOptions = array_merge(['show' => false], $this->clientOptions); |
vendor/yiisoft/yii2-bootstrap/Nav.php
@@ -10,7 +10,6 @@ namespace yii\bootstrap; | @@ -10,7 +10,6 @@ namespace yii\bootstrap; | ||
10 | use Yii; | 10 | use Yii; |
11 | use yii\base\InvalidConfigException; | 11 | use yii\base\InvalidConfigException; |
12 | use yii\helpers\ArrayHelper; | 12 | use yii\helpers\ArrayHelper; |
13 | -use yii\helpers\Html; | ||
14 | 13 | ||
15 | /** | 14 | /** |
16 | * Nav renders a nav HTML component. | 15 | * Nav renders a nav HTML component. |
@@ -34,6 +33,11 @@ use yii\helpers\Html; | @@ -34,6 +33,11 @@ use yii\helpers\Html; | ||
34 | * ['label' => 'Level 1 - Dropdown B', 'url' => '#'], | 33 | * ['label' => 'Level 1 - Dropdown B', 'url' => '#'], |
35 | * ], | 34 | * ], |
36 | * ], | 35 | * ], |
36 | + * [ | ||
37 | + * 'label' => 'Login', | ||
38 | + * 'url' => ['site/login'], | ||
39 | + * 'visible' => Yii::$app->user->isGuest | ||
40 | + * ], | ||
37 | * ], | 41 | * ], |
38 | * 'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation | 42 | * 'options' => ['class' =>'nav-pills'], // set this to nav-tab to get tab-styled navigation |
39 | * ]); | 43 | * ]); |
@@ -59,6 +63,7 @@ class Nav extends Widget | @@ -59,6 +63,7 @@ class Nav extends Widget | ||
59 | * - linkOptions: array, optional, the HTML attributes of the item's link. | 63 | * - linkOptions: array, optional, the HTML attributes of the item's link. |
60 | * - options: array, optional, the HTML attributes of the item container (LI). | 64 | * - options: array, optional, the HTML attributes of the item container (LI). |
61 | * - active: boolean, optional, whether the item should be on active state or not. | 65 | * - active: boolean, optional, whether the item should be on active state or not. |
66 | + * - dropDownOptions: array, optional, the HTML options that will passed to the [[Dropdown]] widget. | ||
62 | * - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget, | 67 | * - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget, |
63 | * or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. | 68 | * or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. |
64 | * | 69 | * |
@@ -116,7 +121,7 @@ class Nav extends Widget | @@ -116,7 +121,7 @@ class Nav extends Widget | ||
116 | if ($this->dropDownCaret === null) { | 121 | if ($this->dropDownCaret === null) { |
117 | $this->dropDownCaret = Html::tag('b', '', ['class' => 'caret']); | 122 | $this->dropDownCaret = Html::tag('b', '', ['class' => 'caret']); |
118 | } | 123 | } |
119 | - Html::addCssClass($this->options, 'nav'); | 124 | + Html::addCssClass($this->options, ['widget' => 'nav']); |
120 | } | 125 | } |
121 | 126 | ||
122 | /** | 127 | /** |
@@ -173,8 +178,8 @@ class Nav extends Widget | @@ -173,8 +178,8 @@ class Nav extends Widget | ||
173 | 178 | ||
174 | if ($items !== null) { | 179 | if ($items !== null) { |
175 | $linkOptions['data-toggle'] = 'dropdown'; | 180 | $linkOptions['data-toggle'] = 'dropdown'; |
176 | - Html::addCssClass($options, 'dropdown'); | ||
177 | - Html::addCssClass($linkOptions, 'dropdown-toggle'); | 181 | + Html::addCssClass($options, ['widget' => 'dropdown']); |
182 | + Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); | ||
178 | if ($this->dropDownCaret !== '') { | 183 | if ($this->dropDownCaret !== '') { |
179 | $label .= ' ' . $this->dropDownCaret; | 184 | $label .= ' ' . $this->dropDownCaret; |
180 | } | 185 | } |
@@ -204,6 +209,7 @@ class Nav extends Widget | @@ -204,6 +209,7 @@ class Nav extends Widget | ||
204 | protected function renderDropdown($items, $parentItem) | 209 | protected function renderDropdown($items, $parentItem) |
205 | { | 210 | { |
206 | return Dropdown::widget([ | 211 | return Dropdown::widget([ |
212 | + 'options' => ArrayHelper::getValue($parentItem, 'dropDownOptions', []), | ||
207 | 'items' => $items, | 213 | 'items' => $items, |
208 | 'encodeLabels' => $this->encodeLabels, | 214 | 'encodeLabels' => $this->encodeLabels, |
209 | 'clientOptions' => false, | 215 | 'clientOptions' => false, |
vendor/yiisoft/yii2-bootstrap/NavBar.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use Yii; | 10 | use Yii; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * NavBar renders a navbar HTML component. | 14 | * NavBar renders a navbar HTML component. |
@@ -28,6 +27,7 @@ use yii\helpers\Html; | @@ -28,6 +27,7 @@ use yii\helpers\Html; | ||
28 | * ['label' => 'Home', 'url' => ['/site/index']], | 27 | * ['label' => 'Home', 'url' => ['/site/index']], |
29 | * ['label' => 'About', 'url' => ['/site/about']], | 28 | * ['label' => 'About', 'url' => ['/site/about']], |
30 | * ], | 29 | * ], |
30 | + * 'options' => ['class' => 'navbar-nav'], | ||
31 | * ]); | 31 | * ]); |
32 | * NavBar::end(); | 32 | * NavBar::end(); |
33 | * ``` | 33 | * ``` |
@@ -56,12 +56,12 @@ class NavBar extends Widget | @@ -56,12 +56,12 @@ class NavBar extends Widget | ||
56 | */ | 56 | */ |
57 | public $containerOptions = []; | 57 | public $containerOptions = []; |
58 | /** | 58 | /** |
59 | - * @var string|boolean the text of the brand of false if it's not used. Note that this is not HTML-encoded. | 59 | + * @var string|boolean the text of the brand or false if it's not used. Note that this is not HTML-encoded. |
60 | * @see http://getbootstrap.com/components/#navbar | 60 | * @see http://getbootstrap.com/components/#navbar |
61 | */ | 61 | */ |
62 | public $brandLabel = false; | 62 | public $brandLabel = false; |
63 | /** | 63 | /** |
64 | - * @param array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]] | 64 | + * @var array|string|boolean $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]] |
65 | * and will be used for the "href" attribute of the brand link. Default value is false that means | 65 | * and will be used for the "href" attribute of the brand link. Default value is false that means |
66 | * [[\yii\web\Application::homeUrl]] will be used. | 66 | * [[\yii\web\Application::homeUrl]] will be used. |
67 | */ | 67 | */ |
@@ -94,11 +94,11 @@ class NavBar extends Widget | @@ -94,11 +94,11 @@ class NavBar extends Widget | ||
94 | { | 94 | { |
95 | parent::init(); | 95 | parent::init(); |
96 | $this->clientOptions = false; | 96 | $this->clientOptions = false; |
97 | - Html::addCssClass($this->options, 'navbar'); | ||
98 | - if ($this->options['class'] === 'navbar') { | ||
99 | - Html::addCssClass($this->options, 'navbar-default'); | 97 | + if (empty($this->options['class'])) { |
98 | + Html::addCssClass($this->options, ['navbar', 'navbar-default']); | ||
99 | + } else { | ||
100 | + Html::addCssClass($this->options, ['widget' => 'navbar']); | ||
100 | } | 101 | } |
101 | - Html::addCssClass($this->brandOptions, 'navbar-brand'); | ||
102 | if (empty($this->options['role'])) { | 102 | if (empty($this->options['role'])) { |
103 | $this->options['role'] = 'navigation'; | 103 | $this->options['role'] = 'navigation'; |
104 | } | 104 | } |
@@ -117,12 +117,11 @@ class NavBar extends Widget | @@ -117,12 +117,11 @@ class NavBar extends Widget | ||
117 | } | 117 | } |
118 | echo $this->renderToggleButton(); | 118 | echo $this->renderToggleButton(); |
119 | if ($this->brandLabel !== false) { | 119 | if ($this->brandLabel !== false) { |
120 | - Html::addCssClass($this->brandOptions, 'navbar-brand'); | 120 | + Html::addCssClass($this->brandOptions, ['widget' => 'navbar-brand']); |
121 | echo Html::a($this->brandLabel, $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl, $this->brandOptions); | 121 | echo Html::a($this->brandLabel, $this->brandUrl === false ? Yii::$app->homeUrl : $this->brandUrl, $this->brandOptions); |
122 | } | 122 | } |
123 | echo Html::endTag('div'); | 123 | echo Html::endTag('div'); |
124 | - Html::addCssClass($this->containerOptions, 'collapse'); | ||
125 | - Html::addCssClass($this->containerOptions, 'navbar-collapse'); | 124 | + Html::addCssClass($this->containerOptions, ['collapse' => 'collapse', 'widget' => 'navbar-collapse']); |
126 | $options = $this->containerOptions; | 125 | $options = $this->containerOptions; |
127 | $tag = ArrayHelper::remove($options, 'tag', 'div'); | 126 | $tag = ArrayHelper::remove($options, 'tag', 'div'); |
128 | echo Html::beginTag($tag, $options); | 127 | echo Html::beginTag($tag, $options); |
vendor/yiisoft/yii2-bootstrap/Progress.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use yii\base\InvalidConfigException; | 10 | use yii\base\InvalidConfigException; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Progress renders a bootstrap progress bar component. | 14 | * Progress renders a bootstrap progress bar component. |
@@ -97,7 +96,7 @@ class Progress extends Widget | @@ -97,7 +96,7 @@ class Progress extends Widget | ||
97 | public function init() | 96 | public function init() |
98 | { | 97 | { |
99 | parent::init(); | 98 | parent::init(); |
100 | - Html::addCssClass($this->options, 'progress'); | 99 | + Html::addCssClass($this->options, ['widget' => 'progress']); |
101 | } | 100 | } |
102 | 101 | ||
103 | /** | 102 | /** |
@@ -153,7 +152,7 @@ class Progress extends Widget | @@ -153,7 +152,7 @@ class Progress extends Widget | ||
153 | 'style' => "width:{$percent}%", | 152 | 'style' => "width:{$percent}%", |
154 | ]; | 153 | ]; |
155 | $options = array_merge($defaultOptions, $options); | 154 | $options = array_merge($defaultOptions, $options); |
156 | - Html::addCssClass($options, 'progress-bar'); | 155 | + Html::addCssClass($options, ['widget' => 'progress-bar']); |
157 | 156 | ||
158 | $out = Html::beginTag('div', $options); | 157 | $out = Html::beginTag('div', $options); |
159 | $out .= $label; | 158 | $out .= $label; |
vendor/yiisoft/yii2-bootstrap/README.md
@@ -7,6 +7,8 @@ in Yii applications extremely easy. | @@ -7,6 +7,8 @@ in Yii applications extremely easy. | ||
7 | 7 | ||
8 | For license information check the [LICENSE](LICENSE.md)-file. | 8 | For license information check the [LICENSE](LICENSE.md)-file. |
9 | 9 | ||
10 | +Documentation is at [docs/guide/README.md](docs/guide/README.md). | ||
11 | + | ||
10 | [](https://packagist.org/packages/yiisoft/yii2-bootstrap) | 12 | [](https://packagist.org/packages/yiisoft/yii2-bootstrap) |
11 | [](https://packagist.org/packages/yiisoft/yii2-bootstrap) | 13 | [](https://packagist.org/packages/yiisoft/yii2-bootstrap) |
12 | [](https://travis-ci.org/yiisoft/yii2-bootstrap) | 14 | [](https://travis-ci.org/yiisoft/yii2-bootstrap) |
vendor/yiisoft/yii2-bootstrap/Tabs.php
@@ -9,7 +9,6 @@ namespace yii\bootstrap; | @@ -9,7 +9,6 @@ namespace yii\bootstrap; | ||
9 | 9 | ||
10 | use yii\base\InvalidConfigException; | 10 | use yii\base\InvalidConfigException; |
11 | use yii\helpers\ArrayHelper; | 11 | use yii\helpers\ArrayHelper; |
12 | -use yii\helpers\Html; | ||
13 | 12 | ||
14 | /** | 13 | /** |
15 | * Tabs renders a Tab bootstrap javascript component. | 14 | * Tabs renders a Tab bootstrap javascript component. |
@@ -70,7 +69,9 @@ class Tabs extends Widget | @@ -70,7 +69,9 @@ class Tabs extends Widget | ||
70 | * - url: string, optional, an external URL. When this is specified, clicking on this tab will bring | 69 | * - url: string, optional, an external URL. When this is specified, clicking on this tab will bring |
71 | * the browser to this URL. This option is available since version 2.0.4. | 70 | * the browser to this URL. This option is available since version 2.0.4. |
72 | * - options: array, optional, the HTML attributes of the tab pane container. | 71 | * - options: array, optional, the HTML attributes of the tab pane container. |
73 | - * - active: boolean, optional, whether the item tab header and pane should be visible or not. | 72 | + * - active: boolean, optional, whether this item tab header and pane should be active. If no item is marked as |
73 | + * 'active' explicitly - the first one will be activated. | ||
74 | + * - visible: boolean, optional, whether the item tab header and pane should be visible or not. Defaults to true. | ||
74 | * - items: array, optional, can be used instead of `content` to specify a dropdown items | 75 | * - items: array, optional, can be used instead of `content` to specify a dropdown items |
75 | * configuration array. Each item can hold three extra keys, besides the above ones: | 76 | * configuration array. Each item can hold three extra keys, besides the above ones: |
76 | * * active: boolean, optional, whether the item tab header and pane should be visible or not. | 77 | * * active: boolean, optional, whether the item tab header and pane should be visible or not. |
@@ -121,7 +122,7 @@ class Tabs extends Widget | @@ -121,7 +122,7 @@ class Tabs extends Widget | ||
121 | public function init() | 122 | public function init() |
122 | { | 123 | { |
123 | parent::init(); | 124 | parent::init(); |
124 | - Html::addCssClass($this->options, 'nav ' . $this->navType); | 125 | + Html::addCssClass($this->options, ['widget' => 'nav', $this->navType]); |
125 | } | 126 | } |
126 | 127 | ||
127 | /** | 128 | /** |
@@ -148,6 +149,9 @@ class Tabs extends Widget | @@ -148,6 +149,9 @@ class Tabs extends Widget | ||
148 | } | 149 | } |
149 | 150 | ||
150 | foreach ($this->items as $n => $item) { | 151 | foreach ($this->items as $n => $item) { |
152 | + if (!ArrayHelper::remove($item, 'visible', true)) { | ||
153 | + continue; | ||
154 | + } | ||
151 | if (!array_key_exists('label', $item)) { | 155 | if (!array_key_exists('label', $item)) { |
152 | throw new InvalidConfigException("The 'label' option is required."); | 156 | throw new InvalidConfigException("The 'label' option is required."); |
153 | } | 157 | } |
@@ -158,13 +162,13 @@ class Tabs extends Widget | @@ -158,13 +162,13 @@ class Tabs extends Widget | ||
158 | 162 | ||
159 | if (isset($item['items'])) { | 163 | if (isset($item['items'])) { |
160 | $label .= ' <b class="caret"></b>'; | 164 | $label .= ' <b class="caret"></b>'; |
161 | - Html::addCssClass($headerOptions, 'dropdown'); | 165 | + Html::addCssClass($headerOptions, ['widget' => 'dropdown']); |
162 | 166 | ||
163 | if ($this->renderDropdown($n, $item['items'], $panes)) { | 167 | if ($this->renderDropdown($n, $item['items'], $panes)) { |
164 | Html::addCssClass($headerOptions, 'active'); | 168 | Html::addCssClass($headerOptions, 'active'); |
165 | } | 169 | } |
166 | 170 | ||
167 | - Html::addCssClass($linkOptions, 'dropdown-toggle'); | 171 | + Html::addCssClass($linkOptions, ['widget' => 'dropdown-toggle']); |
168 | $linkOptions['data-toggle'] = 'dropdown'; | 172 | $linkOptions['data-toggle'] = 'dropdown'; |
169 | $header = Html::a($label, "#", $linkOptions) . "\n" | 173 | $header = Html::a($label, "#", $linkOptions) . "\n" |
170 | . Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); | 174 | . Dropdown::widget(['items' => $item['items'], 'clientOptions' => false, 'view' => $this->getView()]); |
@@ -172,7 +176,7 @@ class Tabs extends Widget | @@ -172,7 +176,7 @@ class Tabs extends Widget | ||
172 | $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); | 176 | $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); |
173 | $options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n); | 177 | $options['id'] = ArrayHelper::getValue($options, 'id', $this->options['id'] . '-tab' . $n); |
174 | 178 | ||
175 | - Html::addCssClass($options, 'tab-pane'); | 179 | + Html::addCssClass($options, ['widget' => 'tab-pane']); |
176 | if (ArrayHelper::remove($item, 'active')) { | 180 | if (ArrayHelper::remove($item, 'active')) { |
177 | Html::addCssClass($options, 'active'); | 181 | Html::addCssClass($options, 'active'); |
178 | Html::addCssClass($headerOptions, 'active'); | 182 | Html::addCssClass($headerOptions, 'active'); |
@@ -228,13 +232,16 @@ class Tabs extends Widget | @@ -228,13 +232,16 @@ class Tabs extends Widget | ||
228 | if (is_string($item)) { | 232 | if (is_string($item)) { |
229 | continue; | 233 | continue; |
230 | } | 234 | } |
235 | + if (isset($item['visible']) && !$item['visible']) { | ||
236 | + continue; | ||
237 | + } | ||
231 | if (!array_key_exists('content', $item)) { | 238 | if (!array_key_exists('content', $item)) { |
232 | throw new InvalidConfigException("The 'content' option is required."); | 239 | throw new InvalidConfigException("The 'content' option is required."); |
233 | } | 240 | } |
234 | 241 | ||
235 | $content = ArrayHelper::remove($item, 'content'); | 242 | $content = ArrayHelper::remove($item, 'content'); |
236 | $options = ArrayHelper::remove($item, 'contentOptions', []); | 243 | $options = ArrayHelper::remove($item, 'contentOptions', []); |
237 | - Html::addCssClass($options, 'tab-pane'); | 244 | + Html::addCssClass($options, ['widget' => 'tab-pane']); |
238 | if (ArrayHelper::remove($item, 'active')) { | 245 | if (ArrayHelper::remove($item, 'active')) { |
239 | Html::addCssClass($options, 'active'); | 246 | Html::addCssClass($options, 'active'); |
240 | Html::addCssClass($item['options'], 'active'); | 247 | Html::addCssClass($item['options'], 'active'); |
vendor/yiisoft/yii2-bootstrap/composer.json
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | } | 18 | } |
19 | ], | 19 | ], |
20 | "require": { | 20 | "require": { |
21 | - "yiisoft/yii2": ">=2.0.4", | 21 | + "yiisoft/yii2": ">=2.0.6", |
22 | "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*" | 22 | "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*" |
23 | }, | 23 | }, |
24 | "autoload": { | 24 | "autoload": { |