3.0 FormHelper pass arbitrary data to stringTemplates?
It would be nice to pass-through arbitrary values to the stringTemplates in form helper. ``` $this->Form->templates(['inputContainer' => '{{content}}']); ``` I think this could be done through the options passed to the helper method. ```php $this->Form->input('field', ['templateVars' => ['outclass' => 'col-1-2']]); ``` I can work on the PR if this seems like a good approach. I am mostly interested in this for being able to set the class of the inputContainer div, but it does seem like there could be other reasons this would be useful. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakePHP 3.0 - Confusion comes from
PR created by #2560 On Sat, Mar 28, 2015 at 6:43 PM, euromark wrote: > It would be cool if you could PR the corrections so that others don't trip > over it, too. > > mark > > > Am Samstag, 28. März 2015 10:35:52 UTC+1 schrieb Bayezid Alam: >> >> Ok, Thanks for reply.. :) >> >> On Sat, Mar 28, 2015 at 3:24 AM, euromark wrote: >> >> The latter is deprecated, this changed during RC and as such the tutorial >> needs some updating. >> Thats all there is to it :) >> >> Mark >> >> >> Am Freitag, 27. März 2015 15:37:26 UTC+1 schrieb Bayezid Alam: >> >> Hi, >> >> A confusion comes on my mind regarding the adding something on CakePHP 3.0 >> >> As example given on below link's in the add function. >> http://book.cakephp.org/3.0/en/tutorials-and-examples/blog/ >> part-two.html#adding-articles >> >> public function add() >> { >> $article = $this->Articles->newEntity(); // *A blank newEnttity >> added stored in $article variable* >> if ($this->request->is('post')) { >> $article = $this->Articles->patchEntity($article, >> $this->request->data); // *A patchEntity added here & passed the request >> data here* >> if ($this->Articles->save($article)) { >> $this->Flash->success(__('Your article has been saved.')); >> return $this->redirect(['action' => 'index']); >> } >> $this->Flash->error(__('Unable to add your article.')); >> } >> $this->set('article', $article); >> } >> >> >> >> But i found a different things on below link >> http://book.cakephp.org/3.0/en/tutorials-and-examples/blog- >> auth-example/auth.html#creating-all-user-related-code >> >> public function add() >> { >> $user = $this->Users->newEntity($this->request->data); // *request >> data passing through newEntity here* >> if ($this->request->is('post')) { >> if ($this->Users->save($user)) { >> $this->Flash->success(__('The user has been saved.')); >> return $this->redirect(['action' => 'add']); >> } >> $this-> >> >> ... >> >> -- >> Like Us on FaceBook https://www.facebook.com/CakePHP >> Find us on Twitter http://twitter.com/CakePHP >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to cake-php+u...@googlegroups.com. >> To post to this group, >> >> ... > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/d/optout. > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakePHP 3.0 - Confusion comes from
It would be cool if you could PR the corrections so that others don't trip over it, too. mark Am Samstag, 28. März 2015 10:35:52 UTC+1 schrieb Bayezid Alam: > > Ok, Thanks for reply.. :) > > On Sat, Mar 28, 2015 at 3:24 AM, euromark > wrote: > > The latter is deprecated, this changed during RC and as such the tutorial > needs some updating. > Thats all there is to it :) > > Mark > > > Am Freitag, 27. März 2015 15:37:26 UTC+1 schrieb Bayezid Alam: > > Hi, > > A confusion comes on my mind regarding the adding something on CakePHP 3.0 > > As example given on below link's in the add function. > http://book.cakephp.org/3.0/en/tutorials-and-examples/ > blog/part-two.html#adding-articles > > public function add() > { > $article = $this->Articles->newEntity(); // *A blank newEnttity added > stored in $article variable* > if ($this->request->is('post')) { > $article = $this->Articles->patchEntity($article, > $this->request->data); // *A patchEntity added here & passed the request data > here* > if ($this->Articles->save($article)) { > $this->Flash->success(__('Your article has been saved.')); > return $this->redirect(['action' => 'index']); > } > $this->Flash->error(__('Unable to add your article.')); > } > $this->set('article', $article); > } > > > > But i found a different things on below link > http://book.cakephp.org/3.0/en/tutorials-and-examples/ > blog-auth-example/auth.html#creating-all-user-related-code > > public function add() > { > $user = $this->Users->newEntity($this->request->data); // *request > data passing through newEntity here* > if ($this->request->is('post')) { > if ($this->Users->save($user)) { > $this->Flash->success(__('The user has been saved.')); > return $this->redirect(['action' => 'add']); > } > $this-> > > ... > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+u...@googlegroups.com . > To post to this group, > > ... -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: CakePHP 3.0 - Confusion comes from
Ok, Thanks for reply.. :) On Sat, Mar 28, 2015 at 3:24 AM, euromark wrote: > The latter is deprecated, this changed during RC and as such the tutorial > needs some updating. > Thats all there is to it :) > > Mark > > > Am Freitag, 27. März 2015 15:37:26 UTC+1 schrieb Bayezid Alam: >> >> Hi, >> >> A confusion comes on my mind regarding the adding something on CakePHP 3.0 >> >> As example given on below link's in the add function. >> http://book.cakephp.org/3.0/en/tutorials-and-examples/ >> blog/part-two.html#adding-articles >> >> public function add() >> { >> $article = $this->Articles->newEntity(); // *A blank newEnttity >> added stored in $article variable* >> if ($this->request->is('post')) { >> $article = $this->Articles->patchEntity($article, >> $this->request->data); // *A patchEntity added here & passed the request >> data here* >> if ($this->Articles->save($article)) { >> $this->Flash->success(__('Your article has been saved.')); >> return $this->redirect(['action' => 'index']); >> } >> $this->Flash->error(__('Unable to add your article.')); >> } >> $this->set('article', $article); >> } >> >> >> >> But i found a different things on below link >> http://book.cakephp.org/3.0/en/tutorials-and-examples/ >> blog-auth-example/auth.html#creating-all-user-related-code >> >> public function add() >> { >> $user = $this->Users->newEntity($this->request->data); // *request >> data passing through newEntity here* >> if ($this->request->is('post')) { >> if ($this->Users->save($user)) { >> $this->Flash->success(__('The user has been saved.')); >> return $this->redirect(['action' => 'add']); >> } >> $this-> >> >> ... > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/d/optout. > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.