YiiWheels
  • Package
  • Class
  • Tree

Packages

  • None
  • yiiwheels
    • behaviors
    • widgets
    • widgets
      • ace
      • box
      • datepicker
      • daterangepicker
      • datetimepicker
      • detail
      • fileupload
      • fileuploader
      • gallery
      • google
      • grid
        • behaviors
        • operations
      • highcharts
      • maskInput
      • maskmoney
      • modal
      • multiselect
      • rangeslider
      • redactor
      • select2
      • sparklines
      • switch
      • timeago
      • timepicker
      • toggle
      • typeahead

Classes

  • WhCountries
  • WhDatePickerHelper
  • WhDropDownInputWidget
  • WhFonts
  • WhFontSizes
  • WhGoogleFonts
  • WhInputWidget
  • WhLanguages
  • WhPhone
  • WhSelectBox
  • WhStates
  • WhTimePickerHelper
  • WhTimezones
 1 <?php
 2 /**
 3  *
 4  * WhCountries.php
 5  *
 6  * Date: 06/09/14
 7  * Time: 14:17
 8  * @author Antonio Ramirez <amigo.cobos@gmail.com>
 9  * @link http://www.ramirezcobos.com/
10  * @link http://www.2amigos.us/
11  */
12 Yii::import('yiiwheels.widgets.formhelpers.WhDropDownInputWidget');
13 
14 class WhCountries extends WhDropDownInputWidget
15 {
16 
17     public function init()
18     {
19         parent::init();
20         TbHtml::addCssClass('bfh-countries', $this->htmlOptions);
21 
22         if(!isset($this->htmlOptions['data-country'])) {
23             $this->htmlOptions['data-country'] = TbArray::popValue('data-value', $this->htmlOptions);
24         }
25         unset($this->htmlOptions['data-name'], $this->htmlOptions['data-value']);
26     }
27 
28     public function run()
29     {
30         if(!$this->readOnly) {
31             echo $this->dropDownList();
32         } else
33         {
34             echo CHtml::tag('span', $this->htmlOptions, '');
35         }
36 
37         $this->registerPlugin('bfhcountries');
38     }
39 }
YiiWheels API documentation generated by ApiGen 2.8.0