Changeset 9878
- Timestamp:
- 06/26/08 08:41:30 (5 months ago)
- Files:
-
- branches/1.1/lib/form/sfForm.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/form/sfForm.class.php
r9536 r9878 32 32 $validatorSchema = null, 33 33 $errorSchema = null, 34 $formField = null,34 $formFieldSchema = null, 35 35 $formFields = array(), 36 36 $isBound = false, … … 105 105 public function render($attributes = array()) 106 106 { 107 return $this->getFormField ()->render($attributes);107 return $this->getFormFieldSchema()->render($attributes); 108 108 } 109 109 … … 677 677 { 678 678 $this->formFields = array(); 679 $this->formField = null;679 $this->formFieldSchema = null; 680 680 } 681 681 … … 712 712 $class = $widget instanceof sfWidgetFormSchema ? 'sfFormFieldSchema' : 'sfFormField'; 713 713 714 $this->formFields[$name] = new $class($widget, $this->getFormField (), $name, isset($values[$name]) ? $values[$name] : null, $this->errorSchema[$name]);714 $this->formFields[$name] = new $class($widget, $this->getFormFieldSchema(), $name, isset($values[$name]) ? $values[$name] : null, $this->errorSchema[$name]); 715 715 } 716 716 … … 750 750 * @return sfFormFieldSchema A sfFormFieldSchema instance 751 751 */ 752 protected function getFormField ()753 { 754 if (is_null($this->formField ))755 { 756 $this->formField = new sfFormFieldSchema($this->widgetSchema, null, null, $this->isBound ? $this->taintedValues : $this->defaults, $this->errorSchema);757 } 758 759 return $this->formField ;752 protected function getFormFieldSchema() 753 { 754 if (is_null($this->formFieldSchema)) 755 { 756 $this->formFieldSchema = new sfFormFieldSchema($this->widgetSchema, null, null, $this->isBound ? $this->taintedValues : $this->defaults, $this->errorSchema); 757 } 758 759 return $this->formFieldSchema; 760 760 } 761 761