I am new to Yii framework and i need to define a function which is being called from /protected/views/layouts/main.php page. can i knw were to define it(Controller/model), so that i can get the corresponding action defined within the function.
Share
Depending on what the function does and how visible you need it to be, you can do one of at least two things:
$this->myFunction();)$this->myModelObject->myFunction();.