├── .gitignore ├── LICENSE.txt ├── README.md ├── app ├── .htaccess ├── cli │ ├── commands │ │ └── .gitkeep │ └── migrations │ │ └── .gitkeep ├── config │ ├── common.php │ ├── console.php │ ├── env │ │ ├── dev.php │ │ └── prod.php │ ├── main.php │ └── test.php ├── controllers │ └── SiteController.php ├── data │ └── .gitkeep ├── extensions │ ├── behaviors │ │ └── .gitkeep │ └── components │ │ ├── EActiveRecord.php │ │ ├── EController.php │ │ └── EWebApplication.php ├── helpers │ ├── .gitkeep │ └── global.php ├── lib │ └── Yiinitializr │ │ ├── CHANGELOG │ │ ├── Cli │ │ ├── Console.php │ │ └── Daemon.php │ │ ├── Composer │ │ └── Callback.php │ │ ├── Helpers │ │ ├── ArrayX.php │ │ ├── Config.php │ │ └── Initializer.php │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── config │ │ ├── console.php │ │ └── settings.php ├── messages │ └── .gitkeep ├── models │ ├── .gitkeep │ └── Person.php ├── modules │ └── .gitkeep ├── views │ ├── layouts │ │ └── main.php │ └── site │ │ ├── charts.php │ │ ├── editors.php │ │ ├── error.php │ │ ├── grid.php │ │ ├── index.php │ │ ├── inputs.php │ │ ├── miscellaneous.php │ │ ├── partials │ │ ├── _empty.php │ │ ├── _heroUnit.php │ │ └── _table.php │ │ ├── started.php │ │ └── todo.php └── widgets │ └── .gitkeep ├── composer.json ├── composer.phar ├── www ├── .htaccess ├── api │ ├── 404.html │ ├── class-WhAceEditor.html │ ├── class-WhBasicFileUpload.html │ ├── class-WhBox.html │ ├── class-WhCarousel.html │ ├── class-WhChart.html │ ├── class-WhCountOfTypeOperation.html │ ├── class-WhCountries.html │ ├── class-WhDatePicker.html │ ├── class-WhDatePickerHelper.html │ ├── class-WhDateRangePicker.html │ ├── class-WhDateTimePicker.html │ ├── class-WhDetailView.html │ ├── class-WhDropDownInputWidget.html │ ├── class-WhFileUpload.html │ ├── class-WhFineUploader.html │ ├── class-WhFontSizes.html │ ├── class-WhFonts.html │ ├── class-WhGallery.html │ ├── class-WhGoogleFonts.html │ ├── class-WhGridView.html │ ├── class-WhGroupGridView.html │ ├── class-WhHighCharts.html │ ├── class-WhHtml5Editor.html │ ├── class-WhImageColumn.html │ ├── class-WhInputWidget.html │ ├── class-WhLanguages.html │ ├── class-WhMaskInput.html │ ├── class-WhMaskMoney.html │ ├── class-WhModal.html │ ├── class-WhMultiSelect.html │ ├── class-WhOperation.html │ ├── class-WhPercentOfTypeEasyPieOperation.html │ ├── class-WhPercentOfTypeGooglePieOperation.html │ ├── class-WhPercentOfTypeOperation.html │ ├── class-WhPhone.html │ ├── class-WhPlugin.html │ ├── class-WhRangeSlider.html │ ├── class-WhRedactor.html │ ├── class-WhRelationalColumn.html │ ├── class-WhResponsive.html │ ├── class-WhSelect2.html │ ├── class-WhSelectBox.html │ ├── class-WhSparkLines.html │ ├── class-WhStates.html │ ├── class-WhSumOperation.html │ ├── class-WhSwitch.html │ ├── class-WhTimeAgo.html │ ├── class-WhTimeAgoFormatter.html │ ├── class-WhTimePicker.html │ ├── class-WhTimePickerHelper.html │ ├── class-WhTimezones.html │ ├── class-WhToggleAction.html │ ├── class-WhToggleColumn.html │ ├── class-WhTypeAhead.html │ ├── class-WhVideoCarousel.html │ ├── class-WhVisualizationChart.html │ ├── class-YiiWheels.html │ ├── elementlist.js │ ├── index.html │ ├── package-None.html │ ├── package-YiiWheels.widgets.ace.html │ ├── package-YiiWheels.widgets.box.html │ ├── package-YiiWheels.widgets.datepicker.html │ ├── package-YiiWheels.widgets.daterangepicker.html │ ├── package-YiiWheels.widgets.datetimepicker.html │ ├── package-YiiWheels.widgets.detail.html │ ├── package-YiiWheels.widgets.fileupload.html │ ├── package-YiiWheels.widgets.fileuploader.html │ ├── package-YiiWheels.widgets.gallery.html │ ├── package-YiiWheels.widgets.google.html │ ├── package-YiiWheels.widgets.grid.html │ ├── package-YiiWheels.widgets.grid.operations.html │ ├── package-YiiWheels.widgets.highcharts.html │ ├── package-YiiWheels.widgets.html │ ├── package-YiiWheels.widgets.maskInput.html │ ├── package-YiiWheels.widgets.maskmoney.html │ ├── package-YiiWheels.widgets.modal.html │ ├── package-YiiWheels.widgets.multiselect.html │ ├── package-YiiWheels.widgets.rangeslider.html │ ├── package-YiiWheels.widgets.redactor.html │ ├── package-YiiWheels.widgets.select2.html │ ├── package-YiiWheels.widgets.sparklines.html │ ├── package-YiiWheels.widgets.switch.html │ ├── package-YiiWheels.widgets.timeago.html │ ├── package-YiiWheels.widgets.timepicker.html │ ├── package-YiiWheels.widgets.toggle.html │ ├── package-YiiWheels.widgets.typeahead.html │ ├── package-yiiwheels.behaviors.html │ ├── package-yiiwheels.html │ ├── package-yiiwheels.widgets.grid.behaviors.html │ ├── resources │ │ ├── bootstrap.min.css │ │ ├── collapsed.png │ │ ├── combined.js │ │ ├── inherit.png │ │ ├── resize.png │ │ ├── sort.png │ │ ├── style.css │ │ ├── tree-cleaner.png │ │ ├── tree-hasnext.png │ │ ├── tree-last.png │ │ └── tree-vertical.png │ ├── source-class-WhAceEditor.html │ ├── source-class-WhBasicFileUpload.html │ ├── source-class-WhBox.html │ ├── source-class-WhCarousel.html │ ├── source-class-WhChart.html │ ├── source-class-WhCountOfTypeOperation.html │ ├── source-class-WhCountries.html │ ├── source-class-WhDatePicker.html │ ├── source-class-WhDatePickerHelper.html │ ├── source-class-WhDateRangePicker.html │ ├── source-class-WhDateTimePicker.html │ ├── source-class-WhDetailView.html │ ├── source-class-WhDropDownInputWidget.html │ ├── source-class-WhFileUpload.html │ ├── source-class-WhFineUploader.html │ ├── source-class-WhFontSizes.html │ ├── source-class-WhFonts.html │ ├── source-class-WhGallery.html │ ├── source-class-WhGoogleFonts.html │ ├── source-class-WhGridView.html │ ├── source-class-WhGroupGridView.html │ ├── source-class-WhHighCharts.html │ ├── source-class-WhHtml5Editor.html │ ├── source-class-WhImageColumn.html │ ├── source-class-WhInputWidget.html │ ├── source-class-WhLanguages.html │ ├── source-class-WhMaskInput.html │ ├── source-class-WhMaskMoney.html │ ├── source-class-WhModal.html │ ├── source-class-WhMultiSelect.html │ ├── source-class-WhOperation.html │ ├── source-class-WhPercentOfTypeEasyPieOperation.html │ ├── source-class-WhPercentOfTypeGooglePieOperation.html │ ├── source-class-WhPercentOfTypeOperation.html │ ├── source-class-WhPhone.html │ ├── source-class-WhPlugin.html │ ├── source-class-WhRangeSlider.html │ ├── source-class-WhRedactor.html │ ├── source-class-WhRelationalColumn.html │ ├── source-class-WhResponsive.html │ ├── source-class-WhSelect2.html │ ├── source-class-WhSelectBox.html │ ├── source-class-WhSparkLines.html │ ├── source-class-WhStates.html │ ├── source-class-WhSumOperation.html │ ├── source-class-WhSwitch.html │ ├── source-class-WhTimeAgo.html │ ├── source-class-WhTimeAgoFormatter.html │ ├── source-class-WhTimePicker.html │ ├── source-class-WhTimePickerHelper.html │ ├── source-class-WhTimezones.html │ ├── source-class-WhToggleAction.html │ ├── source-class-WhToggleColumn.html │ ├── source-class-WhTypeAhead.html │ ├── source-class-WhVideoCarousel.html │ ├── source-class-WhVisualizationChart.html │ ├── source-class-YiiWheels.html │ └── tree.html ├── apple-touch-icon-114x114-precomposed.png ├── apple-touch-icon-57x57-precomposed.png ├── apple-touch-icon-72x72-precomposed.png ├── apple-touch-icon-precomposed.png ├── apple-touch-icon.png ├── css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── main.css │ ├── prettify.css │ ├── style.css │ └── styles.css ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── humans.txt ├── images │ ├── 2-amigos.jpg │ ├── 2amigos-logo.png │ ├── _logo-navbar.png │ ├── bg-jumbotron.png │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── logo-navbar.png │ ├── logo.png │ ├── snapshot-logo.png │ └── trasparentCentre.png ├── img │ ├── github-logo.png │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── html5-logo-165-cut.png │ ├── loader.gif │ └── yii-powered.png ├── index.php ├── js │ ├── app.js │ ├── holder.js │ ├── libs │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── jquery-1.9.1.js │ │ ├── jquery-1.9.1.min.js │ │ ├── modernizr-2.0.6.min.js │ │ └── modernizr-2.6.2-respond-1.1.0.min.js │ ├── main.js │ ├── plugins.js │ ├── prettify.js │ └── script.js └── robots.txt ├── yiic ├── yiic.bat └── yiic.php /.gitignore: -------------------------------------------------------------------------------- 1 | # cache directories 2 | Thumbs.db 3 | *.DS_Store 4 | *.empty 5 | 6 | #phpstorm project files 7 | .idea 8 | 9 | #netbeans project files 10 | nbproject 11 | 12 | #eclipse, zend studio, aptana or other eclipse like project files 13 | .buildpath 14 | .project 15 | .settings 16 | 17 | # sass cache files 18 | *.sass-cache 19 | 20 | # mac deployment helpers 21 | switch 22 | index 23 | 24 | # runtime and cache directories 25 | /app/runtime 26 | /www/assets 27 | 28 | # yiinitializr env.lock 29 | /app/lib/Yiinitializr/config/env.lock 30 | 31 | # env files and testdrive database 32 | /app/config/env.php 33 | /app/data/testdrive.db 34 | 35 | # composer 36 | /app/lib/vendor 37 | composer.lock 38 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, 2amigOS! Consultation Group, LLC. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | Redistributions in binary form must reproduce the above copyright notice, this 11 | list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | Neither the name of the {organization} nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![2amigOS!](http://yiiwheels.2amigos.us/images/logo-navbar.png)](http://www.2amigos.us) 2 | ========= 3 | 4 | Documentation site for Yiiwheels, the enhancement library for Yiistrap. 5 | 6 | This repository is to give you hands on working examples in a Yii application and also for you to collaborate with our site. 7 | 8 | Yii Wheels (or Wheels) is an extended library for the [YiiStrap](http://getyiistrap.com) extension. 9 | 10 | Please, visit [YiiWheels](http://yiiwheels.2amigos.us) site for further documentation of its use. 11 | 12 | > [![2amigOS!](http://www.gravatar.com/avatar/55363394d72945ff7ed312556ec041e0.png)](http://www.2amigos.us) 13 | web development has never been so fun 14 | [www.2amigos.us](http://www.2amigos.us) 15 | -------------------------------------------------------------------------------- /app/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all 2 | -------------------------------------------------------------------------------- /app/cli/commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/cli/commands/.gitkeep -------------------------------------------------------------------------------- /app/cli/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/cli/migrations/.gitkeep -------------------------------------------------------------------------------- /app/config/common.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | return array( 13 | 'basePath' => realPath(__DIR__ . '/..'), 14 | 'preload' => array('log'), 15 | 'aliases' => array( 16 | ), 17 | 'import' => array( 18 | 'application.controllers.*', 19 | 'application.extensions.components.*', 20 | 'application.extensions.behaviors.*', 21 | 'application.helpers.*', 22 | 'application.models.*' 23 | ), 24 | 'components' => array( 25 | 'db'=>array( 26 | 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db', 27 | ), 28 | 'errorHandler' => array( 29 | 'errorAction' => 'site/error', 30 | ), 31 | 'log' => array( 32 | 'class' => 'CLogRouter', 33 | 'routes' => array( 34 | array( 35 | 'class' => 'CFileLogRoute', 36 | 'levels' => 'error, warning', 37 | ), 38 | ), 39 | ), 40 | ), 41 | 'params' => array( 42 | 43 | // php configuration 44 | 'php.defaultCharset' => 'utf-8', 45 | 'php.timezone' => 'UTC', 46 | ) 47 | ); -------------------------------------------------------------------------------- /app/config/console.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | defined('APP_CONFIG_NAME') or define('APP_CONFIG_NAME', 'console'); 13 | return array( 14 | 'commandMap' => array( 15 | 'migrate' => array( 16 | 'class' => 'system.cli.commands.MigrateCommand', 17 | 'migrationPath' => 'application.cli.migrations' 18 | ) 19 | ) 20 | ); -------------------------------------------------------------------------------- /app/config/env/dev.php: -------------------------------------------------------------------------------- 1 | 5 | * @link http://www.ramirezcobos.com/ 6 | * @link http://www.2amigos.us/ 7 | * @copyright 2013 2amigOS! Consultation Group LLC 8 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 9 | */ 10 | return array( 11 | 'modules' => array( 12 | 'gii' => array( 13 | 'class' => 'system.gii.GiiModule', 14 | 'password' => 'yii', 15 | 'ipFilters' => array('127.0.0.1','::1'), 16 | ), 17 | ), 18 | 'components' => array( 19 | // modify to suit your needs 20 | // 'db' => array( 21 | // 'connectionString' => '{CONNECTION_STRING}', 22 | // 'username' => '{USERNAME}', 23 | // 'password' => '{PASSWORD}', 24 | // 'enableProfiling' => true, 25 | // 'enableParamLogging' => true, 26 | // 'charset' => 'utf8', 27 | // ), 28 | ), 29 | 'params' => array( 30 | 'yii.handleErrors' => true, 31 | 'yii.debug' => true, 32 | 'yii.traceLevel' => 3, 33 | ) 34 | ); -------------------------------------------------------------------------------- /app/config/env/prod.php: -------------------------------------------------------------------------------- 1 | 5 | * @link http://www.ramirezcobos.com/ 6 | * @link http://www.2amigos.us/ 7 | * @copyright 2013 2amigOS! Consultation Group LLC 8 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 9 | */ 10 | return array( 11 | 'components' => array( 12 | // configure to suit your needs 13 | // 'db' => array( 14 | // 'connectionString' => '{DB_CONNECTION}', 15 | // 'username' => '{DB_USER}', 16 | // 'password' => '{DB_PASSWORD}', 17 | // 'enableProfiling' => YII_DEBUG, 18 | // 'enableParamLogging' => YII_DEBUG, 19 | // 'charset' => 'utf8', 20 | // ), 21 | ), 22 | 'params' => array( 23 | 'yii.debug' => false, 24 | 'yii.traceLevel' => 0, 25 | 'yii.handleErrors' => APP_CONFIG_NAME !== 'test', 26 | ) 27 | ); -------------------------------------------------------------------------------- /app/config/main.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | defined('APP_CONFIG_NAME') or define('APP_CONFIG_NAME', 'main'); 13 | 14 | use Yiinitializr\Helpers\ArrayX; 15 | 16 | // web application configuration 17 | return ArrayX::merge( 18 | array( 19 | 'name' => 'Yiiwheels', 20 | // path aliases 21 | 'aliases' => array( 22 | 'vendor' => realpath( 23 | __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'vendor' 24 | ), 25 | 'bootstrap' => 'vendor.crisu83.yiistrap', 26 | 'yiiwheels' => 'vendor.2amigos.yiiwheels', 27 | ), 28 | // import 29 | 'import' => array( 30 | 'bootstrap.helpers.*', 31 | 'bootstrap.behaviors.*', 32 | ), 33 | // application behaviors 34 | 'behaviors' => array(), 35 | // controllers mappings 36 | 'controllerMap' => array(), 37 | // application modules 38 | 'modules' => array(), 39 | // application components 40 | 'components' => array( 41 | 42 | 'bootstrap' => array( 43 | 'class' => 'bootstrap.components.TbApi', 44 | 'forceCopyAssets' => true 45 | ), 46 | 'yiiwheels' => array( 47 | 'class' => 'yiiwheels.YiiWheels' 48 | ), 49 | 'format' => array( 50 | 'class' => 'yiiwheels.widgets.timeago.WhTimeAgoFormatter' 51 | ), 52 | 'clientScript' => array( 53 | 'scriptMap' => array( 54 | 'bootstrap.min.css' => false, 55 | 'bootstrap.min.js' => false, 56 | 'bootstrap-yii.css' => false, 57 | ) 58 | ), 59 | 'urlManager' => array( 60 | // uncomment the following if you have enabled Apache's Rewrite module. 61 | 'urlFormat' => 'path', 62 | 'showScriptName' => false, 63 | 'rules' => array( 64 | // default rules 65 | '/' => '/view', 66 | '//' => '/', 67 | '/' => '/', 68 | ), 69 | ), 70 | 'user' => array( 71 | 'allowAutoLogin' => true, 72 | ), 73 | 'errorHandler' => array( 74 | 'errorAction' => 'site/error', 75 | ) 76 | ), 77 | // application parameters 78 | 'params' => array(), 79 | ), 80 | require_once('common.php') 81 | ); -------------------------------------------------------------------------------- /app/config/test.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | return array( 13 | 'params' => array( 14 | 'yii.handleErrors' => false, 15 | ) 16 | ); -------------------------------------------------------------------------------- /app/controllers/SiteController.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | class SiteController extends EController 13 | { 14 | public function actionIndex() 15 | { 16 | $this->render('index'); 17 | } 18 | 19 | /** 20 | * Renders get started page 21 | */ 22 | public function actionStarted() 23 | { 24 | $this->render('started'); 25 | } 26 | 27 | /** 28 | * Renders the Editor docs 29 | */ 30 | public function actionEditors() 31 | { 32 | $this->render('editors'); 33 | } 34 | 35 | /** 36 | * Renders the grid docs 37 | */ 38 | public function actionGrid() 39 | { 40 | $this->render('grid'); 41 | } 42 | 43 | /** 44 | * Renders the Charts docs 45 | */ 46 | public function actionCharts() 47 | { 48 | $this->render('charts'); 49 | } 50 | 51 | /** 52 | * Renders the Miscellanous docs 53 | */ 54 | public function actionMiscellaneous() 55 | { 56 | $this->render('miscellaneous'); 57 | } 58 | 59 | /** 60 | * Renders the Form docs 61 | */ 62 | public function actionInputs() 63 | { 64 | $this->render('inputs'); 65 | } 66 | 67 | /** 68 | /** 69 | * This is the action to handle external exceptions. 70 | */ 71 | public function actionError() 72 | { 73 | if ($error = Yii::app()->errorHandler->error) { 74 | if (Yii::app()->request->isAjaxRequest) 75 | echo $error['message']; 76 | else 77 | $this->render('error', $error); 78 | } 79 | } 80 | 81 | /** 82 | * Fileupload test 83 | */ 84 | public function actionUpload() 85 | { 86 | if (Yii::app()->getRequest()->getParam('fine')) { 87 | $this->renderJson( 88 | array( 89 | 'success' => 'true' 90 | ) 91 | ); 92 | Yii::app()->end(); 93 | } 94 | $this->renderJson( 95 | array( 96 | "files" => array( 97 | array( 98 | "url" => $this->baseUrl('js/holder.js/300x200'), 99 | "thumbnailUrl" => $this->baseUrl('js/holder.js/120x80'), 100 | "name" => time() . "_test.jpg", 101 | "type" => "image/jpeg", 102 | "size" => 58825, 103 | "deleteUrl" => $this->createUrl('site/delete'), 104 | "deleteType" => "DELETE" 105 | ) 106 | ) 107 | ) 108 | ); 109 | } 110 | 111 | /** 112 | * Delete test 113 | */ 114 | public function actionDelete() 115 | { 116 | echo true; 117 | } 118 | 119 | /** 120 | * Fake editable 121 | */ 122 | public function actionEditable() 123 | { 124 | sleep(1); 125 | } 126 | 127 | /** 128 | * Renders the a dummy content for relational column 129 | */ 130 | public function actionRelational() 131 | { 132 | echo '
' . 133 | CHtml::image($this->baseUrl('images/2-amigos.jpg')) . 134 | '
'; 135 | } 136 | 137 | /** 138 | * Fake toggle 139 | */ 140 | public function actionToggle() 141 | { 142 | 143 | } 144 | 145 | } -------------------------------------------------------------------------------- /app/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/data/.gitkeep -------------------------------------------------------------------------------- /app/extensions/behaviors/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/extensions/behaviors/.gitkeep -------------------------------------------------------------------------------- /app/extensions/components/EActiveRecord.php: -------------------------------------------------------------------------------- 1 | 8 | * @link http://www.ramirezcobos.com/ 9 | * @link http://www.2amigos.us/ 10 | * @copyright 2013 2amigOS! Consultation Group LLC 11 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 12 | */ 13 | class EActiveRecord extends CActiveRecord 14 | { 15 | /** 16 | * default form ID for the current model. Defaults to get_class()+'-form' 17 | */ 18 | private $_formId; 19 | 20 | public function setFormId($value) 21 | { 22 | $this->_formId = $value; 23 | } 24 | 25 | public function getFormId() 26 | { 27 | if (null !== $this->_formId) 28 | return $this->_formId; 29 | else 30 | { 31 | $this->_formId = strtolower(get_class($this)) . '-form'; 32 | return $this->_formId; 33 | } 34 | } 35 | 36 | /** 37 | * default grid ID for the current model. Defaults to get_class()+'-grid' 38 | */ 39 | private $_gridId; 40 | 41 | public function setGridId($value) 42 | { 43 | $this->_gridId = $value; 44 | } 45 | 46 | public function getGridId() 47 | { 48 | if (null !== $this->_gridId) 49 | return $this->_gridId; 50 | else 51 | { 52 | $this->_gridId = strtolower(get_class($this)) . '-grid'; 53 | return $this->_gridId; 54 | } 55 | } 56 | 57 | /** 58 | * default list ID for the current model. Defaults to get_class()+'-list' 59 | */ 60 | private $_listId; 61 | 62 | public function setListId($value) 63 | { 64 | $this->_listId = $value; 65 | } 66 | 67 | public function getListId() 68 | { 69 | if (null !== $this->_listId) 70 | return $this->_listId; 71 | else 72 | { 73 | $this->_listId = strtolower(get_class($this)) . '-list'; 74 | return $this->_listId; 75 | } 76 | } 77 | 78 | /** 79 | * Logs the record update information. 80 | * Updates the four columns: create_user_id, create_date, last_update_user_id and last_update_date. 81 | */ 82 | protected function logUpdate() 83 | { 84 | $userId = php_sapi_name() === 'cli' 85 | ? -1 86 | : Yii::app()->user->id; 87 | 88 | foreach (array('create_user_id' => $userId, 'create_date' => time()) as $attribute => $value) 89 | $this->updateLogAttribute($attribute, $value, (!($userId===-1 || Yii::app()->user->isGuest) && $this->isNewRecord)); 90 | 91 | foreach (array('last_update_user_id' => $userId, 'last_update_date' => time()) as $attribute => $value) 92 | $this->updateLogAttribute($attribute, $value, (!($userId===-1 || Yii::app()->user->isGuest) && !$this->isNewRecord)); 93 | } 94 | 95 | /** 96 | * Helper function to update attributes 97 | * @param $attribute 98 | * @param $value 99 | * @param $check 100 | */ 101 | protected function updateLogAttribute($attribute, $value, $check) 102 | { 103 | 104 | if ($this->hasAttribute($attribute) && $check) 105 | $this->$attribute = $value; 106 | 107 | } 108 | 109 | /** 110 | * updates the log fields before saving 111 | * @return boolean 112 | */ 113 | public function beforeSave() 114 | { 115 | $this->logUpdate(); 116 | return parent::beforeSave(); 117 | } 118 | 119 | } 120 | -------------------------------------------------------------------------------- /app/extensions/components/EController.php: -------------------------------------------------------------------------------- 1 | 8 | * @link http://www.ramirezcobos.com/ 9 | * @link http://www.2amigos.us/ 10 | * @copyright 2013 2amigOS! Consultation Group LLC 11 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 12 | */ 13 | class EController extends CController 14 | { 15 | public $meta_keywords = array(); 16 | public $meta_description = array(); 17 | public $breadcrumbs; 18 | 19 | 20 | /** 21 | * Gets a param 22 | * @param $name 23 | * @param null $defaultValue 24 | * @return mixed 25 | */ 26 | public function getActionParam($name, $defaultValue = null) 27 | { 28 | return Yii::app()->request->getParam($name, $defaultValue ); 29 | } 30 | 31 | /** 32 | * Loads the requested data model. 33 | * @param string the model class name 34 | * @param integer the model ID 35 | * @param array additional search criteria 36 | * @param boolean whether to throw exception if the model is not found. Defaults to true. 37 | * @return CActiveRecord the model instance. 38 | * @throws CHttpException if the model cannot be found 39 | */ 40 | protected function loadModel($class, $id, $criteria = array(), $exceptionOnNull = true) 41 | { 42 | if (empty($criteria)) 43 | $model = CActiveRecord::model($class)->findByPk($id); 44 | else 45 | { 46 | $finder = CActiveRecord::model($class); 47 | $c = new CDbCriteria($criteria); 48 | $c->mergeWith(array( 49 | 'condition' => $finder->tableSchema->primaryKey . '=:id', 50 | 'params' => array(':id' => $id), 51 | )); 52 | $model = $finder->find($c); 53 | } 54 | if (isset($model)) 55 | return $model; 56 | else if ($exceptionOnNull) 57 | throw new CHttpException(404, 'Unable to find the requested object.'); 58 | } 59 | 60 | /** 61 | * Performs the AJAX validation. 62 | * @param CModel the model to be validated 63 | */ 64 | protected function performAjaxValidation($model) 65 | { 66 | if (isset($_POST['ajax']) && $_POST['ajax'] === $model->formId) 67 | { 68 | echo CActiveForm::validate($model); 69 | Yii::app()->end(); 70 | } 71 | } 72 | 73 | /** 74 | * Outputs (echo) json representation of $data, prints html on debug mode. 75 | * NOTE: json_encode exists in PHP > 5.2, so it's safe to use it directly without checking 76 | * @param array $data the data (PHP array) to be encoded into json array 77 | * @param int $opts Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_FORCE_OBJECT. 78 | */ 79 | public function renderJson($data, $opts=null) 80 | { 81 | if(YII_DEBUG && isset($_GET['debug']) && is_array($data)) 82 | { 83 | foreach($data as $type => $v) 84 | printf('

%s

%s', $type, is_array($v) ? json_encode($v, $opts) : $v); 85 | } 86 | else 87 | { 88 | header('Vary: Accept'); 89 | if (isset($_SERVER['HTTP_ACCEPT']) && (strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false)) { 90 | header('Content-type: application/json; charset=UTF-8'); 91 | } else { 92 | header('Content-type: text/plain; charset=UTF-8'); 93 | } 94 | echo json_encode($data, $opts); 95 | } 96 | } 97 | 98 | /** 99 | * Utility function to ensure the base url. 100 | * @param $url 101 | * @return string 102 | */ 103 | public function baseUrl( $url = '' ) 104 | { 105 | static $baseUrl; 106 | if ($baseUrl === null) 107 | $baseUrl = Yii::app()->request->baseUrl; 108 | return $baseUrl . '/' . ltrim($url, '/'); 109 | } 110 | 111 | } -------------------------------------------------------------------------------- /app/extensions/components/EWebApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | class EWebApplication extends CWebApplication { 13 | 14 | /** 15 | * This function is here because we aren't creating a locale file for every client. 16 | * Thus we provide a fallback to "en". 17 | */ 18 | public function getLocale($localeID = null) { 19 | try { 20 | return parent::getLocale($localeID); 21 | } catch (Exception $e) { 22 | return CLocale::getInstance('en'); 23 | } 24 | } 25 | 26 | /** 27 | * We were getting tons of errors in the logs from OPTIONS requests for the URI "*" 28 | * As it turns out, the requests were from localhost (::1) and are apparently a way 29 | * that Apache polls its processes to see if they're alive. This function causes 30 | * Yii to respond without logging errors. 31 | */ 32 | public function runController($route) { 33 | try { 34 | parent::runController($route); 35 | } catch (CHttpException $e) { 36 | if (@$_SERVER['REQUEST_METHOD'] == 'OPTIONS' && @$_SERVER['REQUEST_URI'] == '*') { 37 | Yii::app()->end('Hello, amigo!'); 38 | } else 39 | throw $e; 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/helpers/.gitkeep -------------------------------------------------------------------------------- /app/lib/Yiinitializr/CHANGELOG: -------------------------------------------------------------------------------- 1 | Yiinitializr Change Log 2 | ======================== 3 | 4 | Thursday 28-March-2013 5 | ---------------------------- 6 | Initial release 7 | -------------------------------------------------------------------------------- /app/lib/Yiinitializr/Cli/Daemon.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Nofriandi Ramenta 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @link https://github.com/nramenta/clio 10 | * @copyright 2013 2amigOS! Consultation Group LLC 11 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 12 | */ 13 | namespace Yiinitializr\Clio; 14 | /** 15 | * Daemon provides helpers for starting and killing daemonized processes 16 | * 17 | * @author Antonio Ramirez 18 | * @package Yiinitializr.Cli 19 | * @since 1.0 20 | */ 21 | class Daemon 22 | { 23 | /** 24 | * Daemonize a Closure object. 25 | * @param array $options Set of options 26 | * @param callable $callable Closure object to daemonize 27 | * @return bool True on success 28 | * @throws \Exception 29 | */ 30 | public static function work(array $options, \Closure $callable) 31 | { 32 | if (!extension_loaded('pcntl')) { 33 | throw new \Exception('pcntl extension required'); 34 | } 35 | 36 | if (!extension_loaded('posix')) { 37 | throw new \Exception('posix extension required'); 38 | } 39 | 40 | if (!isset($options['pid'])) { 41 | throw new \Exception('pid not specified'); 42 | } 43 | 44 | $options = $options + array( 45 | 'stdin' => '/dev/null', 46 | 'stdout' => '/dev/null', 47 | 'stderr' => 'php://stdout', 48 | ); 49 | 50 | if (($lock = @fopen($options['pid'], 'c+')) === false) { 51 | throw new \Exception('unable to open pid file ' . $options['pid']); 52 | } 53 | 54 | if (!flock($lock, LOCK_EX | LOCK_NB)) { 55 | throw new \Exception('could not acquire lock for ' . $options['pid']); 56 | } 57 | 58 | switch ($pid = pcntl_fork()) { 59 | case -1: 60 | throw new \Exception('unable to fork'); 61 | case 0: 62 | break; 63 | default: 64 | fseek($lock, 0); 65 | ftruncate($lock, 0); 66 | fwrite($lock ,$pid); 67 | fflush($lock); 68 | return true; 69 | } 70 | 71 | if (posix_setsid() === -1) { 72 | throw new \Exception('failed to setsid'); 73 | } 74 | 75 | fclose(STDIN); 76 | fclose(STDOUT); 77 | fclose(STDERR); 78 | 79 | if (!($stdin = fopen($options['stdin'], 'r'))) { 80 | throw new \Exception('failed to open STDIN ' . $options['stdin']); 81 | } 82 | 83 | if (!($stdout = fopen($options['stdout'], 'w'))) { 84 | throw new \Exception('failed to open STDOUT ' . $options['stdout']); 85 | } 86 | 87 | if (!($stderr = fopen($options['stderr'], 'w'))) { 88 | throw new \Exception('failed to open STDERR ' . $options['stderr']); 89 | } 90 | 91 | pcntl_signal(SIGTSTP, SIG_IGN); 92 | pcntl_signal(SIGTTOU, SIG_IGN); 93 | pcntl_signal(SIGTTIN, SIG_IGN); 94 | pcntl_signal(SIGHUP, SIG_IGN); 95 | 96 | call_user_func($callable, $stdin, $stdout, $stderr); 97 | } 98 | 99 | /** 100 | * Whether a process is running or not 101 | * @param $file 102 | * @return bool 103 | * @throws \Exception 104 | */ 105 | public static function isRunning($file) 106 | { 107 | if (!extension_loaded('posix')) { 108 | throw new \Exception('posix extension required'); 109 | } 110 | 111 | if (!is_readable($file)) { 112 | return false; 113 | } 114 | 115 | if (($lock = @fopen($file, 'c+')) === false) { 116 | throw new \Exception('unable to open pid file ' . $file); 117 | } 118 | 119 | if (flock($lock, LOCK_EX | LOCK_NB)) { 120 | return false; 121 | } else { 122 | flock($lock, LOCK_UN); 123 | return true; 124 | } 125 | } 126 | 127 | /** 128 | * Kills a daemon process specified by its PID file. 129 | * 130 | * @param $file Daemon PID file 131 | * @param bool $delete Flag to delete PID file after killing 132 | * @return bool True on success, false otherwise 133 | * @throws \Exception 134 | */ 135 | public static function kill($file, $delete = false) 136 | { 137 | if (!extension_loaded('posix')) { 138 | throw new \Exception('posix extension required'); 139 | } 140 | 141 | if (!is_readable($file)) { 142 | throw new \Exception('unreadable pid file ' . $file); 143 | } 144 | 145 | if (($lock = @fopen($file, 'c+')) === false) { 146 | throw new \Exception('unable to open pid file ' . $file); 147 | } 148 | 149 | if (flock($lock, LOCK_EX | LOCK_NB)) { 150 | flock($lock, LOCK_UN); 151 | throw new \Exception('process not running'); 152 | } 153 | 154 | $pid = fgets($lock); 155 | 156 | if (posix_kill($pid, SIGTERM)) { 157 | if ($delete) unlink($file); 158 | return true; 159 | } else { 160 | return false; 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /app/lib/Yiinitializr/Helpers/Config.php: -------------------------------------------------------------------------------- 1 | 6 | * @link http://www.ramirezcobos.com/ 7 | * @link http://www.2amigos.us/ 8 | * @copyright 2013 2amigOS! Consultation Group LLC 9 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 10 | */ 11 | namespace Yiinitializr\Helpers; 12 | 13 | use Yiinitializr\Helpers\ArrayX; 14 | 15 | /** 16 | * Config provides easy access to Yiinitializr configuration file 17 | * 18 | * @author Antonio Ramirez 19 | * @package Yiinitializr.helpers 20 | * @since 1.0 21 | */ 22 | class Config 23 | { 24 | /** 25 | * @var array the configuration settings 26 | */ 27 | private static $_settings; 28 | 29 | private static $_config_dir_path; 30 | private static $_envlock_file_path; 31 | 32 | /** 33 | * Returns a value of the array 34 | * @param $value 35 | * @return mixed | null if no key is found 36 | */ 37 | public static function value($value) 38 | { 39 | return ArrayX::get(self::settings(), $value); 40 | } 41 | 42 | /** 43 | * Reads the configuration settings from the file 44 | * @return array|mixed 45 | * @throws \Exception 46 | */ 47 | public static function settings() 48 | { 49 | if (null === self::$_settings) 50 | { 51 | self::$_settings = file_exists(self::getConfigurationDirectoryPath() . '/settings.php') 52 | ? require_once(self::getConfigurationDirectoryPath() . '/settings.php') 53 | : array(); 54 | self::$_settings['envlock'] = file_exists(self::getEnvironmentLockFilePath()); 55 | 56 | } 57 | if (empty(self::$_settings)) 58 | throw new \Exception('Unable to find Yiinitialzr settings file!'); 59 | 60 | return self::$_settings; 61 | } 62 | 63 | /** 64 | * @param string $content 65 | */ 66 | public static function createEnvironmentLockFile($content = '') 67 | { 68 | umask(0); 69 | file_put_contents(self::getEnvironmentLockFilePath(), $content); 70 | @chmod(self::getEnvironmentLockFilePath(), 0644); 71 | } 72 | 73 | /** 74 | * Returns the configuration directory path 75 | * @return string 76 | */ 77 | public static function getConfigurationDirectoryPath() 78 | { 79 | if (null === self::$_config_dir_path) 80 | self::$_config_dir_path = dirname(__FILE__) . '/../config'; 81 | return self::$_config_dir_path; 82 | } 83 | 84 | /** 85 | * Returns the environment lock file path 86 | * @return string 87 | */ 88 | public static function getEnvironmentLockFilePath() 89 | { 90 | if (null === self::$_envlock_file_path) 91 | self::$_envlock_file_path = self::getConfigurationDirectoryPath() . '/env.lock'; 92 | return self::$_envlock_file_path; 93 | } 94 | } -------------------------------------------------------------------------------- /app/lib/Yiinitializr/LICENSE: -------------------------------------------------------------------------------- 1 | The Yiinitializr is free software. It is released under the terms of 2 | the following BSD License. 3 | 4 | Copyright (c) 2013 by 2amigOS! Consultation Group LLC (http://www.2amigos.us) 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in 14 | the documentation and/or other materials provided with the 15 | distribution. 16 | * Neither the name of 2amigOS! Consultation Group LLC nor the names of its 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /app/lib/Yiinitializr/README.md: -------------------------------------------------------------------------------- 1 | Yiinitializr 2 | ============ 3 | 4 | Library that will help boost your application installation with ease and also to run Yii applications from its 5 | bootstrap files on a much cleaner way that the framework currently proposes. For example: 6 | 7 | ``` 8 | // yii has been installed via composer 9 | require('./../app/lib/vendor/yiisoft/yii/framework/yii.php'); 10 | 11 | // set alias for namespacing 12 | // make sure the path is correct as it can also be installed via composer (see above) 13 | Yii::setPathOfAlias('Yiinitializr', './../app/lib/Yiinitializr'); 14 | 15 | // use its initializr 16 | use Yiinitializr\Helpers\Initializer; 17 | 18 | // tell the Initializer class providing the root, the application config name, 19 | // and the files to merge -very useful when working with advanced boilerplates 20 | // and different environments 21 | Initializer::create('./../app', 'main', array('common', 'env', 'local'))->run(); 22 | ``` 23 | 24 | INSTALLATION 25 | ------------ 26 | If you are going to use Yiinitializr to make use of `Yiinitializr\Helpers\Initializr` you can easily install it via 27 | `composer`, but if you are going to use it within your application structure in order to configure your application 28 | according to your custom needs, then the recommended use is that you [download](https://github.com/2amigos/yiinitializr/archive/master.zip) 29 | its source files and place them on a top level folder. 30 | 31 | ###Configuration Settings 32 | As with Yii, you need to go through a bit of configuration settings if you wish to handle your project structure setup 33 | with `composer`. Don't worry, is not going to be too hard, the following is an example configuration file: 34 | 35 | ``` 36 | \\ where am i? 37 | $dirname = dirname(__FILE__); 38 | \\ where is the application folder? 39 | $app = $dirname . '/../../..'; 40 | \\ where is the root? 41 | $root = $app . '/..'; 42 | 43 | return array( 44 | // yii configurations 45 | 'yii' => array( 46 | // where is the path of the yii framework? 47 | // On this example we have installed yii with composer 48 | // and as it is used after composer installation, we 49 | // can safely point to the vendor folder. 50 | 'path' => $app . '/lib/vendor/yiisoft/yii/framework' 51 | ), 52 | // yiinitializr specific settings 53 | 'yiinitializr' => array( 54 | // config folders 55 | 'config' => array( 56 | // we just need the console settings 57 | // On this example, and due that I used environments 58 | // i created a custom console.php app for 59 | // Yiinitializr\Composer\Callbak class (see below example) 60 | 'console' => $dirname . '/console.php' 61 | ), 62 | // application structure settings 63 | 'app' => array( 64 | // where is the root? 65 | 'root' => $root, 66 | // directories setup 67 | 'directories' => array( 68 | // where are the different configuration files settings? 69 | 'config' => array( 70 | // 'key' is the configuration name (see above init example) 71 | 'main' => $app . '/config', 72 | 'console' => $app . '/config', 73 | 'test' => $app . '/config' 74 | ), 75 | // where are my runtime folders? 76 | 'runtime' => array( 77 | // heads up! only the folder location as "/config" will be 78 | // appended 79 | $app 80 | ), 81 | 'assets' => array( 82 | // where to write the "assets folders"? 83 | $root . '/www' 84 | ) 85 | ) 86 | ), 87 | ) 88 | ); 89 | ``` 90 | 91 | Here is an example of a custom `console.php` settings file when working with environments. As you saw on the previous 92 | code, this file on the example was located on the same `Yiinitializr\config` folder: 93 | 94 | ``` 95 | require_once dirname(__FILE__) . '/../Helpers/Initializer.php'; 96 | require_once dirname(__FILE__) . '/../Helpers/ArrayX.php'; 97 | 98 | return Yiinitializr\Helpers\ArrayX::merge( 99 | Yiinitializr\Helpers\Initializer::config('console', array('common', 'env', 'local')), 100 | array( 101 | 'params' => array( 102 | // here is where the composer magic start. 103 | // Thanks! mr Tobias a.k.a Phundament man! 104 | 'composer.callbacks' => array( 105 | 'post-update' => array('yiic', 'migrate'), 106 | 'post-install' => array('yiic', 'migrate'), 107 | ) 108 | ), 109 | ) 110 | ); 111 | ``` 112 | 113 | REQUIREMENTS 114 | ------------ 115 | It works in conjunction with `composer` to install the boilerplate but 116 | The minimum requirements by Yiinitializr that you have installed `composer` or have a `composer.phar` on your application 117 | root in order to run and ** PHP 5.3+** 118 | 119 | 120 | ###Resources 121 | - [Composer](http://getcomposer.org) 122 | - [Phundament](http://phundament.com/) 123 | - [Download latest ZIPball](https://github.com/2amigos/yiinitializr/archive/master.zip) 124 | - [2amigOS Packagist Profile](https://packagist.org/packages/2amigos/) 125 | 126 | > [![2amigOS!](http://www.gravatar.com/avatar/55363394d72945ff7ed312556ec041e0.png)](http://www.2amigos.us) 127 | web development has never been so fun 128 | [www.2amigos.us](http://www.2amigos.us) -------------------------------------------------------------------------------- /app/lib/Yiinitializr/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "2amigos/yiinitializr", 3 | "description": "Yii Web Programming Framework Application initializing library.", 4 | "keywords": ["yii", "framework", "application", "boilerplate"], 5 | "homepage": "http://yiinitializr.2amigos.us/", 6 | "type": "library", 7 | "license": "BSD-3-Clause", 8 | "authors": [ 9 | { 10 | "name": "Antonio Ramirez", 11 | "email": "amigo.cobos@gmail.com", 12 | "homepage": "http://www.2amigos.us/", 13 | "role": "Founder and development" 14 | }, 15 | { 16 | "name": "Matt Tabin", 17 | "email": "amigo.tabin@gmail.com", 18 | "homepage": "http://www.2amigos.us/", 19 | "role": "Founder and development" 20 | } 21 | ], 22 | "support": { 23 | "issues": "https://github.com/2amigos/yiinitializr/issues?state=open", 24 | "wiki": "https://github.com/2amigos/yiinitializr", 25 | "source": "https://github.com/2amigos/yiinitializr" 26 | }, 27 | "require": { 28 | "php": ">=5.3.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/lib/Yiinitializr/config/console.php: -------------------------------------------------------------------------------- 1 | 6 | * @link http://www.ramirezcobos.com/ 7 | * @link http://www.2amigos.us/ 8 | * @copyright 2013 2amigOS! Consultation Group LLC 9 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 10 | */ 11 | /** 12 | * Include required classes 13 | */ 14 | require_once dirname(__FILE__) . '/../Helpers/Initializer.php'; 15 | require_once dirname(__FILE__) . '/../Helpers/ArrayX.php'; 16 | 17 | /** 18 | * Return the configuration array appending composer callback methods 19 | */ 20 | return Yiinitializr\Helpers\ArrayX::merge( 21 | Yiinitializr\Helpers\Initializer::config('console', array('common', 'env', 'local')), 22 | array( 23 | 'params' => array( 24 | 'composer.callbacks' => array( 25 | 'post-update' => array('yiic', 'migrate'), 26 | 'post-install' => array('yiic', 'migrate'), 27 | ) 28 | ), 29 | ) 30 | ); -------------------------------------------------------------------------------- /app/lib/Yiinitializr/config/settings.php: -------------------------------------------------------------------------------- 1 | 6 | * @link http://www.ramirezcobos.com/ 7 | * @link http://www.2amigos.us/ 8 | * @copyright 2013 2amigOS! Consultation Group LLC 9 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 10 | */ 11 | $dirname = dirname(__FILE__); 12 | $app = $dirname . '/../../..'; 13 | $root = $app . '/..'; 14 | 15 | return array( 16 | 'yii' => array( 17 | 'path' => $app . '/lib/vendor/yiisoft/yii/framework' 18 | ), 19 | 'yiinitializr' => array( 20 | 'config' => array( 21 | 'console' => $dirname . '/console.php' 22 | ), 23 | 'app' => array( 24 | 'root' => $root, 25 | 'directories' => array( 26 | 'config' => array( 27 | 'main' => $app . '/config', 28 | 'console' => $app . '/config', 29 | 'test' => $app . '/config' 30 | ), 31 | 'runtime' => array( 32 | $app 33 | ), 34 | 'assets' => array( 35 | $root . '/www' 36 | ) 37 | ) 38 | ), 39 | ) 40 | ); -------------------------------------------------------------------------------- /app/messages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/messages/.gitkeep -------------------------------------------------------------------------------- /app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/models/.gitkeep -------------------------------------------------------------------------------- /app/models/Person.php: -------------------------------------------------------------------------------- 1 | firstName = 'Antonio'; 76 | $person->lastName = 'Ramirez'; 77 | $person->language = 'Spanish'; 78 | $person->hours = 'Hours'; 79 | return $person; 80 | } 81 | 82 | /** 83 | * Helper function to get example grid data provider 84 | * @return CArrayDataProvider 85 | */ 86 | public static function getGridDataProvider() 87 | { 88 | $mark = new Person(); 89 | $mark->id = 1; 90 | $mark->firstName = 'Mark'; 91 | $mark->lastName = 'Otto'; 92 | $mark->language = 'CSS'; 93 | $mark->hours = 10; 94 | $mark->status = 1; 95 | 96 | $jacob = new Person(); 97 | $jacob->id = 2; 98 | $jacob->firstName = 'Jacob'; 99 | $jacob->lastName = 'Thornton'; 100 | $jacob->language = 'JavaScript'; 101 | $jacob->hours = 20; 102 | $jacob->status = 0; 103 | 104 | $stu = new Person(); 105 | $stu->id = 3; 106 | $stu->firstName = 'Stu'; 107 | $stu->lastName = 'Dent'; 108 | $stu->language = 'HTML'; 109 | $stu->hours = 15; 110 | $stu->status = 1; 111 | 112 | $sunny = new Person(); 113 | $sunny->id = 4; 114 | $sunny->firstName = 'Sunny'; 115 | $sunny->lastName = 'Man'; 116 | $sunny->language = 'HTML'; 117 | $sunny->hours = 15; 118 | $sunny->status = 0; 119 | 120 | $persons = array($mark, $jacob, $stu, $sunny); 121 | 122 | return new CArrayDataProvider($persons); 123 | } 124 | 125 | /** 126 | * Helper function to get example grid columns 127 | * @return array 128 | */ 129 | public static function getGridColumns() 130 | { 131 | return array( 132 | array('name' => 'id', 'header' => '#'), 133 | array('name' => 'firstName', 'header' => 'First name'), 134 | array('name' => 'lastName', 'header' => 'Last name'), 135 | array('name' => 'language', 'header' => 'Language'), 136 | array('name' => 'hours', 'header' => 'Hours worked', 'htmlOptions'=>array('class'=>'tobeselected')), 137 | array( 138 | 'htmlOptions' => array('nowrap' => 'nowrap'), 139 | 'class' => 'bootstrap.widgets.TbButtonColumn', 140 | 'header' => 'Edit', 141 | 'viewButtonUrl' => null, 142 | 'updateButtonUrl' => null, 143 | 'deleteButtonUrl' => null, 144 | 'buttons' => array( 145 | 'delete' => array( 146 | 'click' => 'function(){return false;}' 147 | ) 148 | ) 149 | ) 150 | ); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /app/modules/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/modules/.gitkeep -------------------------------------------------------------------------------- /app/views/layouts/main.php: -------------------------------------------------------------------------------- 1 | 2 | bootstrap->registerCoreScripts(null, CClientScript::POS_HEAD); ?> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | <?php echo e($this->pageTitle); ?> 17 | 18 | 21 | 22 | 31 | 32 | 33 | 34 | widget( 35 | 'bootstrap.widgets.TbNavbar', 36 | array( 37 | 'brandLabel' => img('images/logo-navbar.png'), 38 | 'brandUrl' => baseUrl('site/index'), 39 | //'collapse' => true, 40 | 'items' => array( 41 | array( 42 | 'class' => 'bootstrap.widgets.TbNav', 43 | 'items' => array( 44 | array('label' => 'Home', 'url' => array('site/index')), 45 | array('label' => 'Get started', 'url' => array('site/started')), 46 | array('label' => 'Widgets', 'url'=>'#', 'items'=> array( 47 | array('label' => 'Charts', 'url' => array('site/charts')), 48 | array('label' => 'Inputs', 'url' => array('site/inputs')), 49 | array('label' => 'Grid', 'url' => array('site/grid')), 50 | array('label' => 'Editors', 'url' => array('site/editors')), 51 | array('label' => 'Miscellanous', 'url' => array('site/miscellaneous')), 52 | )), 53 | array('label' => 'API', 'url' => array('/api')), 54 | ), 55 | ), 56 | ), 57 | ) 58 | ); 59 | ?> 60 | Fork me on GitHub 61 | 62 | 63 | 64 | 90 | 91 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /app/views/site/editors.php: -------------------------------------------------------------------------------- 1 | pageTitle = 'Widgets - ' . param('pageTitle'); 6 | ?> 7 | 9 |
10 |
11 |

Widgets

12 | 13 |

Getting advanced with widgets

14 |
15 |
16 | 17 |
18 | 19 | 21 |
22 |
23 | 27 |
28 |
29 | 30 | 32 |
33 | 34 | 'Action', 'url' => '#'), 36 | array('label' => 'Another action', 'url' => '#'), 37 | array('label' => 'Something else here', 'url' => '#'), 38 | TbHtml::menuDivider(), 39 | array('label' => 'Separate link', 'url' => '#'), 40 | ); ?> 41 | 46 | 47 |

Basic Example 48 | Ace Editor in mode html 49 |

50 |

51 | Implements the amazing high performance ace code editor. For more information about the plugin, please 52 | visit 53 | Ace editor website. 54 |

55 | 56 |

Write some HTML code :)

57 | 58 |
59 | widget( 61 | 'yiiwheels.widgets.ace.WhAceEditor', 62 | array( 63 | 'name' => 'aceTest', 64 | 'htmlOptions' => array('style' => 'width:100%;height:150px') 65 | ) 66 | );?> 67 |
68 | 69 |
 70 | <?php $this->widget('yiiwheels.widgets.ace.WhAceEditor',
 71 | array(
 72 |     'name'=>'aceTest',
 73 |     'htmlOptions'=> array('style' => 'width:100%;height:150px')
 74 | ));?>
75 |
76 | 77 | 79 |
80 | 81 | 86 | 87 |

88 | The great edtior RedactorJS from imperavi, 89 | now free for Yii Development, thanks to the russian community, specially 90 | Alex Makarov. You guys ROCK! 91 |

92 | 93 |
94 | widget('yiiwheels.widgets.redactor.WhRedactor', array( 95 | 'name' => 'redactortest' 96 | ));?> 97 |
98 | 99 |
100 | <?php $this->widget('yiiwheels.widgets.redactor.WhRedactor', array(
101 |     'name' => 'redactortest'
102 | ));?>
103 |     
104 |
105 |
106 | 117 | 118 | comments powered by Disqus 119 |
120 |
121 | 122 | clientScript->registerScript( 125 | 'javascript#ReadyJS', 126 | <<pageTitle=Yii::app()->name . ' - Error'; 6 | $this->breadcrumbs=array( 7 | 'Error', 8 | ); 9 | ?> 10 | 11 |

Error

12 | 13 |
14 | 15 |
-------------------------------------------------------------------------------- /app/views/site/index.php: -------------------------------------------------------------------------------- 1 | pageTitle = param('pageTitle'); 4 | ?> 5 |
6 |
7 |

8 | 9 |

Extension Library for Yiistrap

10 |

Now Bootstrap 3+ Ready

11 |

Download 13 | Yiiwheels

14 | 22 |
23 |
24 | 25 |
26 |
27 | 45 |
46 |
47 | 57 | 58 | 59 | 60 | 73 | 74 |
75 | 76 |
77 | 78 |

Introducing Yii Wheels

79 | 80 | 81 | 82 |
83 |
84 |

85 | Yii Wheels has been completely rebuilt from ground up. It differs from its predecessor, YiiBooster, 86 | in that widgets and their assets are isolated in their own folders; which promotes better and easier 87 | maintenance. 88 | YiiBooster had to register all its required assets at the once, and developers soon realized that 89 | this slowed things down, as compared to Yii-Bootstrap's performance. Now, with YiiWheels, you 90 | register only what you need, when you need it, nothing else, nothing more. Simple, but elegant. 91 |

92 |
93 |
94 |
95 |
96 | -------------------------------------------------------------------------------- /app/views/site/partials/_empty.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/views/site/partials/_empty.php -------------------------------------------------------------------------------- /app/views/site/partials/_heroUnit.php: -------------------------------------------------------------------------------- 1 |

This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

2 | 'primary','size'=>'large')); ?> -------------------------------------------------------------------------------- /app/views/site/partials/_table.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
#First nameLast nameLanguageHours worked
1MarkOttoCSS10
2JacobThorntonJavaScript20
3StuDentHTML15
35 | -------------------------------------------------------------------------------- /app/views/site/todo.php: -------------------------------------------------------------------------------- 1 | TODO 2 | 3 | -------------------------------------------------------------------------------- /app/widgets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/app/widgets/.gitkeep -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yiinitializr/basic", 3 | "description": "description_text", 4 | "keywords": [ 5 | "yii", 6 | "application", 7 | "web", 8 | "boilerplate", 9 | "template" 10 | ], 11 | "homepage": "http://2amigos.us", 12 | "type": "yii-application", 13 | "license": "BSD-3-Clause", 14 | "minimum-stability": "dev", 15 | "config": { 16 | "vendor-dir": "app/lib/vendor" 17 | }, 18 | "authors": [ 19 | { 20 | "name": "Antonio Ramirez Cobos", 21 | "email": "amigo.cobos@gmail.com", 22 | "homepage": "http://www.ramirezcobos.com" 23 | }, 24 | { 25 | "name": "Matt Tabin", 26 | "email": "amigo.tabin@gmail.com", 27 | "homepage": "http://2amigos.us" 28 | } 29 | ], 30 | "repositories": [ 31 | { 32 | "type": "composer", 33 | "url": "http://packages.phundament.com" 34 | } 35 | ], 36 | "require": { 37 | "yiisoft/yii": ">=1.1.13", 38 | "2amigos/yiiwheels": "2.*" 39 | }, 40 | "autoload": { 41 | "psr-0": { 42 | "Yiinitializr": "app/lib/" 43 | } 44 | }, 45 | "scripts": { 46 | "pre-install-cmd": "Yiinitializr\\Composer\\Callback::preInstall", 47 | "post-install-cmd": "Yiinitializr\\Composer\\Callback::postInstall", 48 | "pre-update-cmd": "Yiinitializr\\Composer\\Callback::preUpdate", 49 | "post-update-cmd": "Yiinitializr\\Composer\\Callback::postUpdate", 50 | "post-package-install": [ 51 | "Yiinitializr\\Composer\\Callback::postPackageInstall" 52 | ], 53 | "post-package-update": [ 54 | "Yiinitializr\\Composer\\Callback::postPackageUpdate" 55 | ] 56 | } 57 | } -------------------------------------------------------------------------------- /composer.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/composer.phar -------------------------------------------------------------------------------- /www/api/elementlist.js: -------------------------------------------------------------------------------- 1 | 2 | var ApiGen = ApiGen || {}; 3 | ApiGen.elements = [["c","WhAceEditor"],["c","WhBasicFileUpload"],["c","WhBox"],["c","WhCarousel"],["c","WhChart"],["c","WhCountOfTypeOperation"],["c","WhCountries"],["c","WhDatePicker"],["c","WhDatePickerHelper"],["c","WhDateRangePicker"],["c","WhDateTimePicker"],["c","WhDetailView"],["c","WhDropDownInputWidget"],["c","WhFileUpload"],["c","WhFineUploader"],["c","WhFonts"],["c","WhFontSizes"],["c","WhGallery"],["c","WhGoogleFonts"],["c","WhGridView"],["c","WhGroupGridView"],["c","WhHighCharts"],["c","WhHtml5Editor"],["c","WhImageColumn"],["c","WhInputWidget"],["c","WhLanguages"],["c","WhMaskInput"],["c","WhMaskMoney"],["c","WhModal"],["c","WhMultiSelect"],["c","WhOperation"],["c","WhPercentOfTypeEasyPieOperation"],["c","WhPercentOfTypeGooglePieOperation"],["c","WhPercentOfTypeOperation"],["c","WhPhone"],["c","WhPlugin"],["c","WhRangeSlider"],["c","WhRedactor"],["c","WhRelationalColumn"],["c","WhResponsive"],["c","WhSelect2"],["c","WhSelectBox"],["c","WhSparkLines"],["c","WhStates"],["c","WhSumOperation"],["c","WhSwitch"],["c","WhTimeAgo"],["c","WhTimeAgoFormatter"],["c","WhTimePicker"],["c","WhTimePickerHelper"],["c","WhTimezones"],["c","WhToggleAction"],["c","WhToggleColumn"],["c","WhTypeAhead"],["c","WhVideoCarousel"],["c","WhVisualizationChart"],["c","YiiWheels"]]; 4 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.ace.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\ace | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.box.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\box | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.datepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\datepicker | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.daterangepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\daterangepicker | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.datetimepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\datetimepicker | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.detail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\detail | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.fileupload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\fileupload | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 136 |
137 | 138 |
139 | 140 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.fileuploader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\fileuploader | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.google.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\google | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.highcharts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\highcharts | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 136 |
137 | 138 |
139 | 140 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.maskInput.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\maskInput | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.maskmoney.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\maskmoney | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.modal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\modal | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.multiselect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\multiselect | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.rangeslider.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\rangeslider | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.redactor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\redactor | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.select2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\select2 | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.sparklines.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\sparklines | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.switch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\switch | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.timeago.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\timeago | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 136 |
137 | 138 |
139 | 140 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.timepicker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\timepicker | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.toggle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\toggle | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 136 |
137 | 138 |
139 | 140 | 170 | 171 | 172 | -------------------------------------------------------------------------------- /www/api/package-YiiWheels.widgets.typeahead.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package YiiWheels\widgets\typeahead | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-yiiwheels.behaviors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package yiiwheels\behaviors | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /www/api/package-yiiwheels.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Package yiiwheels | YiiWheels 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 40 | 41 |
42 | 135 |
136 | 137 |
138 | 139 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /www/api/resources/collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/collapsed.png -------------------------------------------------------------------------------- /www/api/resources/inherit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/inherit.png -------------------------------------------------------------------------------- /www/api/resources/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/resize.png -------------------------------------------------------------------------------- /www/api/resources/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/sort.png -------------------------------------------------------------------------------- /www/api/resources/tree-cleaner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/tree-cleaner.png -------------------------------------------------------------------------------- /www/api/resources/tree-hasnext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/tree-hasnext.png -------------------------------------------------------------------------------- /www/api/resources/tree-last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/tree-last.png -------------------------------------------------------------------------------- /www/api/resources/tree-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/api/resources/tree-vertical.png -------------------------------------------------------------------------------- /www/apple-touch-icon-114x114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/apple-touch-icon-114x114-precomposed.png -------------------------------------------------------------------------------- /www/apple-touch-icon-57x57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/apple-touch-icon-57x57-precomposed.png -------------------------------------------------------------------------------- /www/apple-touch-icon-72x72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/apple-touch-icon-72x72-precomposed.png -------------------------------------------------------------------------------- /www/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /www/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/apple-touch-icon.png -------------------------------------------------------------------------------- /www/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* ========================================================================== 4 | Author's custom styles 5 | ========================================================================== */ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /www/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { 2 | color: #93a1a1; 3 | } 4 | 5 | .lit { 6 | color: #195f91; 7 | } 8 | 9 | .pun, .opn, .clo { 10 | color: #93a1a1; 11 | } 12 | 13 | .fun { 14 | color: #dc322f; 15 | } 16 | 17 | .str, .atv { 18 | color: #D14; 19 | } 20 | 21 | .kwd, .prettyprint .tag { 22 | color: #1e347b; 23 | } 24 | 25 | .typ, .atn, .dec, .var { 26 | color: teal; 27 | } 28 | 29 | .pln { 30 | color: #48484c; 31 | } 32 | 33 | .prettyprint { 34 | padding: 8px; 35 | background-color: #f7f7f9; 36 | border: 1px solid #e1e1e8; 37 | } 38 | 39 | .prettyprint.linenums { 40 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 41 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 42 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 43 | } 44 | 45 | /* Specify class=linenums on a pre to get line numbering */ 46 | ol.linenums { 47 | margin: 0 0 0 33px; /* IE indents via margin-left */ 48 | } 49 | 50 | ol.linenums li { 51 | padding-left: 12px; 52 | color: #bebec5; 53 | line-height: 20px; 54 | text-shadow: 0 1px 0 #fff; 55 | } -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/favicon.ico -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /www/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | /* TEAM */ 5 | 6 | Senior Developer: Antonio Ramirez 7 | Contact: amigo.cobos [at] gmail.com 8 | Twitter: @tonydspaniard 9 | From: Majorca, Catalonia, Spain 10 | 11 | /* THANKS */ 12 | 13 | (First) Phundamente man: Tobias Munk 14 | From: Stuttgart, Schwabenland, Germany 15 | 16 | /* SITE */ 17 | Standards: HTML5, CSS3 18 | Components: JQuery, Modernizr, Yii Framework 19 | Doctype: HTML5 20 | IDE: PhpStorm 6.0 21 | -------------------------------------------------------------------------------- /www/images/2-amigos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/2-amigos.jpg -------------------------------------------------------------------------------- /www/images/2amigos-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/2amigos-logo.png -------------------------------------------------------------------------------- /www/images/_logo-navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/_logo-navbar.png -------------------------------------------------------------------------------- /www/images/bg-jumbotron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/bg-jumbotron.png -------------------------------------------------------------------------------- /www/images/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /www/images/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/glyphicons-halflings.png -------------------------------------------------------------------------------- /www/images/logo-navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/logo-navbar.png -------------------------------------------------------------------------------- /www/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/logo.png -------------------------------------------------------------------------------- /www/images/snapshot-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/snapshot-logo.png -------------------------------------------------------------------------------- /www/images/trasparentCentre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/images/trasparentCentre.png -------------------------------------------------------------------------------- /www/img/github-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/github-logo.png -------------------------------------------------------------------------------- /www/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /www/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /www/img/html5-logo-165-cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/html5-logo-165-cut.png -------------------------------------------------------------------------------- /www/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/loader.gif -------------------------------------------------------------------------------- /www/img/yii-powered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2amigos/yiiwheels-docs/8647d4123ed8b9a1971f60cabecc84005ee0e5b2/www/img/yii-powered.png -------------------------------------------------------------------------------- /www/index.php: -------------------------------------------------------------------------------- 1 | 7 | * @link http://www.ramirezcobos.com/ 8 | * @link http://www.2amigos.us/ 9 | * @copyright 2013 2amigOS! Consultation Group LLC 10 | * @license http://www.opensource.org/licenses/bsd-license.php New BSD License 11 | */ 12 | require('./../app/lib/vendor/autoload.php'); 13 | 14 | $global = __DIR__ . '/../app/helpers/global.php'; 15 | require_once($global); 16 | 17 | Yiinitializr\Helpers\Initializer::create('./../app', 'main', array('common', 'env', 'local'))->run(); -------------------------------------------------------------------------------- /www/js/app.js: -------------------------------------------------------------------------------- 1 | // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT 2 | // IT'S ALL JUST JUNK FOR OUR DOCS! 3 | // ++++++++++++++++++++++++++++++++++++++++++ 4 | 5 | !function ($) { 6 | 7 | $(function () { 8 | var $window = $(window); 9 | $('section [href^=#]').click(function (e) { 10 | e.preventDefault() 11 | }) 12 | 13 | $('.bs-docs-sidenav').affix({ 14 | offset: { 15 | top: function () { 16 | return $window.width() <= 980 ? 290 : 210 17 | }, bottom: 270 18 | } 19 | }); 20 | 21 | prettyPrint(); 22 | }) 23 | 24 | // Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi 25 | $.ajaxTransport('jsonpi', function (opts, originalOptions, jqXHR) { 26 | var url = opts.url; 27 | 28 | return { 29 | send: function (_, completeCallback) { 30 | var name = 'jQuery_iframe_' + jQuery.now() 31 | , iframe, form 32 | 33 | iframe = $('