Changeset 6492
- Timestamp:
- 12/13/07 23:21:16 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjs2Plugin/trunk/lib/helper/sfExtjs2Helper.php
r6436 r6492 25 25 * - created 26 26 */ 27 28 class sfExtjsVar { 29 30 private $var = ''; 31 32 public function __construct($var) 33 { 34 $this->var = $var; 35 } 36 37 public function __toString() 38 { 39 return $this->var; 40 } 41 42 } 43 27 44 class sfExtjs2Plugin { 28 45 … … 111 128 #enables us to have empty keys removed 112 129 if(is_null($value)) continue; 113 130 114 131 #quotes everything not in the quote_except value list 115 if( !is_array($value))116 { 117 $attributes[$key] = (sfExtjs2Plugin::quote_except($key, $value) ? '\''.$value.'\'' : $value);132 if( !is_array($value) && sfExtjs2Plugin::quote_except($key, $value) && !($value instanceof sfExtjsVar) ) 133 { 134 $attributes[$key] = '\''.$value.'\''; 118 135 } 119 136 else … … 449 466 foreach ($array_value as $key => $v) 450 467 { 451 if (!is_array($v) && ($v != 'true') && ($v != 'false'))468 if (!is_array($v) && sfExtjs2Plugin::quote_except($key, $v) && !($v instanceof sfExtjsVar)) 452 469 { 453 470 $value .= sprintf('%s%s:\'%s\'', ($value === '{' ? '' : ','), $key, sfExtjs2Plugin::_process_value($v));