Question: How can I call this method in Yii Framework:

```
$this->renderPartial(string $fileNameToRenderData, bool $wheaterToReturnOrEchoDirectly);

```

Statically, like this:

```
GodForbiddenClassName::renderPartial(string $fileNameToRenderData, bool $wheaterToReturnOrEchoDirectly);

```

Answer: 
i have to use render partial in model, i had code like this

```
    public function sendEmail(){
        $emailTemplate = new EmailTemplate();
        $message = $emailTemplate->getEmailTemplate(EmailTemplate::AGENT_CONTACT_REFFER);
        $message = $emailTemplate->replaceConstantWithValues($this->agent,$message);
        $message = $emailTemplate->replaceConstantWithValues($this->contact,$message);
        //$message = $emailTemplate->replaceConstantWithValues($this->contact->notes,$message);
        $message = str_replace("[CONTACT_NOTES]", Yii::app()->controller->renderPartial('application.views.note._notes', array('notes'=>$this->contact->notes,'showLinks'=>false),true),$message);
        $message = $emailTemplate->replaceConstantWithValues($this,$message);

        $email = Yii::app()->email;
        $email->from = $this->referringAgent->email;
        $email->to = $this->agent->email;
        $email->subject = "An agent has referred a contact to you";
        $email->message = $message;
        $email->send();
    }

```

Here i have used Yii::app()->controller->renderPartial
[Check this yii wiki article](http://www.yiiframework.com/wiki/556/email-template-functionality-with-manage-content-from-database/) written by me .. :)

====>>> $emailTemplate = $this->renderPartial('template/templatecontact',array(),true); //Getting email template content