コード例 #1
0
 /**
  * We override this method so we can pass through the layoutColumns from the 'form'
  * into the widget.
  */
 public function widget($className, $properties = array(), $captureOutput = false)
 {
     // We don't want to override the default layoutColumns with an empty array.
     if (empty($properties['layoutColumns'])) {
         unset($properties['layoutColumns']);
     }
     //override form layoutColumns with any properties set by the form controls
     $properties['layoutColumns'] = array_merge($this->layoutColumns, isset($properties['layoutColumns']) ? $properties['layoutColumns'] : array());
     return parent::widget($className, $properties, $captureOutput);
 }