Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Bad Idea To Use Get_Defined_Vars() With Partial Views?

$
0
0
Sometimes I embed a customizable partial view inside of another view. In these cases, it can be a pain to pass all the view parameters individually.

Is it a bad idea to just pass all the available variables to the partial view? E.g.:
$this->renderPartial('_subView', get_defined_vars());

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>