CakePHP 3.0 - Custom helpers not working

2014-06-11 Thread Mikaël Capelle
Hi everyone, I'm trying to update my helpers to CakePHP 3.0 but each time I try to load them I get the following error : Error: *Html* could not be found. > Error: Create the class *Html* below in file: App\View\Helper\Html.php My AppController looks like : public $helpers = [ > 'Html'

CakePHP 3.0 Validation ?

2014-07-28 Thread Mikaël Capelle
Hi everyone, I'm trying to build a new CakePHP 3 application but I didn't manage to get the data validation working... I followed the CakePHP 3.0 book, and particulary this page http://book.cakephp.org/3.0/en/tutorials-and-examples/blog/part-two.html but it didn't help. Currently, my Table is

Re: CakePHP 3.0 Validation ?

2014-07-28 Thread Mikaël Capelle
>Devoirs = TableRegistry::get('Devoirs'); > > > On Monday, July 28, 2014 10:20:06 PM UTC+2, Mikaël Capelle wrote: >> >> Hi everyone, >> >> I'm trying to build a new CakePHP 3 application but I didn't manage to >> get the data validation working.

CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-01 Thread Mikaël Capelle
Hi everyone, I am porting my CakePHP 2.0 helpers to CakePHP 3.0 and I am facing some troubles with my custom FormHelper. The helpers are made to be used with bootstrap, the two form helpers can be found here: - CakePHP 2 - https://github.com/Holt59/cakephp-bootstrap3-helpers/blob/master

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-01 Thread Mikaël Capelle
tom widget, depending on how much customisation you want > > > > > On 01 Aug 2014, at 12:24, Mikaël Capelle > wrote: > > > Hi everyone, > > > > I am porting my CakePHP 2.0 helpers to CakePHP 3.0 and I am facing some > troubles with my custom For

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-01 Thread Mikaël Capelle
tainer' => > $template]]); > > An alternative is not using input(); but just build the html yourself in > the template and call $this->Form->text('foo') , for example > > On Friday, August 1, 2014 1:51:48 PM UTC+2, Mikaël Capelle wrote: >> >> Thanks f

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-01 Thread Mikaël Capelle
é Lorenzo wrote: > > Look at this project for inspiration: > > > https://github.com/commercial-hippie/chocolate/blob/master/src/View/Helper/BootstrapFormHelper.php > > On Friday, August 1, 2014 2:31:44 PM UTC+2, Mikaël Capelle wrote: >> >> I think my question wa

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Mikaël Capelle
> input tag out of the FormHelper - Keep it simple... > > T > > > > > On Fri, Aug 1, 2014 at 8:25 PM, Mikaël Capelle > wrote: > >> Thanks for the link! Unfortunately it doesn't help since it does not >> allow user to create bootstrap 'input-gr

Re: CakePHP 3.0 - Correct way to append / prepend HTML on FormHelper

2014-08-04 Thread Mikaël Capelle
;=>'@']); > > $this->Form->input('field',[moreoptions]); > > > but then IMHO it is plain abuse of CPU cycles > > > T > > > > > On Mon, Aug 4, 2014 at 3:06 PM, Mikaël Capelle > wrote: > >> How would you do that? >> >

CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-24 Thread Mikaël Capelle
Hi everyone, I am writing a CakePHP 3.0 plugins, and I have multiple helpers (inheriting from either HTMLHelper, FormHelper, PaginatorHelper, etc.). In each of these new helpers, I have a function *addClass* (copy/paste from helper to helper... ). I don't really like having duplicated code (5

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Mikaël Capelle
lementds addClass(). > > On Friday, July 24, 2015 at 10:23:43 AM UTC+2, Mikaël Capelle wrote: >> >> Hi everyone, >> >> I am writing a CakePHP 3.0 plugins, and I have multiple helpers >> (inheriting from either HTMLHelper, FormHelper, PaginatorHelper, etc.). >> I

Re: CakePHP 3.0 Plugin - Where to put a « global » function for multiple helpers

2015-07-27 Thread Mikaël Capelle
Thanks! Exactly what I was looking for. On Monday, July 27, 2015 at 2:29:31 PM UTC+2, Florian Krämer wrote: > > Then use a trait <http://php.net/manual/en/language.oop5.traits.php>. > > On Monday, July 27, 2015 at 11:32:54 AM UTC+2, Mikaël Capelle wrote: >> >> I c