framework/web/form/CForm.php
public function getModel($checkParent=true)
	{
		if(!$checkParent)
			return $this->_model;
		$form=$this;
		while($form->_model===null && $form->getParent() instanceof self)
			$form=$form->getParent();
		return $form->_model;
	}
public function getModel($checkParent=true)
	{
		if(!$checkParent)
			return $this->_model;
		$form=$this;
		while($form->_model===null && $form->getParent() instanceof self)
			$form=$form->getParent();
		return $form->_model;
	}
public function getModel ( $ checkParent = true ) { if ( ! $ checkParent ) return $ this -> _model ; $ form = $ this ; while ( $ form -> _model === null && $ form -> getParent ( ) instanceof self ) $ form = $ form -> getParent ( ) ; return $ form -> _model ; }
Returns the model that this form is associated with.
@param boolean $checkParent whether to return parent's model if this form doesn't have model by itself.
@return CModel the model associated with this form. If this form does not have a model,
it will look for a model in its ancestors.
Returns the model that this form is associated with .