Cakephp Helpers in Views and $this -


i'm trying determine best standard using helpers in views whether should be

echo $form->input(); 

or

echo $this->form->input(); 

in cakephp manual ver 1.2 helper class accessed helper object directly, whereas in 1.3 book helper object accessed through view.

does matter?

leo

it matters because of possibility of having collision "wipe out" access helper. had model named form , decided in view after getting many records.

foreach ($forms $form) {     echo $form['form']['name'] . '<br/>'; } 

see happened there? accidentally overwrote $form variable, losing formhelper.

the standard access helpers via $this in view.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -