Re: CakePHP 3 session usage in a custom class

2015-04-02 Thread Subi
You are right. This is a much better solution. On Wednesday, April 1, 2015 at 11:06:02 PM UTC+2, José Lorenzo wrote: > > I would pass the session object to the place where you need it. > > On Wednesday, April 1, 2015 at 10:54:19 PM UTC+2, Subi wrote: >> >> Which is the best way for using session i

Cakephp 3.0 saveField

2015-04-02 Thread DiV
How can I update a single field if I know record's id without retrieving a row? There was a method saveField for this action in cakephp 2.x -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscr

Re: How to set Cake 3.0 to save with different date format ?

2015-04-02 Thread Celso
Thanks ! The solution was: class AppController extends Controller { /** * Initialization hook method. * * Use this method to add common initialization code like loading components. * * @return void */ public function initialize() { $this->loadC

Re: How to set Cake 3.0 to save with different date format ?

2015-04-02 Thread José Lorenzo
Read this: http://book.cakephp.org/3.0/en/orm/database-basics.html#parsing-localized-datetime-data On Thursday, April 2, 2015 at 6:10:58 PM UTC+2, Celso wrote: > > Hi guys I have a table in Mysql with a date field, and I need to allow my > user writes something like *31/12/2015*. > > > echo $th

How to set Cake 3.0 to save with different date format ?

2015-04-02 Thread Celso
Hi guys I have a table in Mysql with a date field, and I need to allow my user writes something like *31/12/2015*. echo $this->Form->input('data_nascimento', ['type' => 'text', 'maxlength'=> '10']); I've tried Time::$defaultLocale = 'pt-BR'; in *AppController* but the problem persists... an

Re: Notice (8): Undefined variable: color [APP/Template\Pages\myshow.ctp, line 2]

2015-04-02 Thread euromark
Hi! Why are you abusing the pages controller for that? It doesn't support actions out of the box. Make yourself a new FooController and then you can have actions for your views. But the PagesController itself only supports view files only (no action for it) The error you get shows this pretty cl

Notice (8): Undefined variable: color [APP/Template\Pages\myshow.ctp, line 2]

2015-04-02 Thread Amit G
Hi, I am using CakePHP3.0 getting *Notice* (8): Undefined variable: color [*APP/Template\Pages\myshow.ctp*, line *2*] how can fix this error? Here is my full code: redirect('/'); } $page = $subpage = null; if (!empty($path[0])) { $page = $path[0];

Re: CakePHP 3.0 - Confusion comes from

2015-04-02 Thread Dave Edwards
Hi Farid, I'm not decrying the value or usefulness of the documentation, or the huge amount of work that has gone into creating it. As this is new functionality (ORM), it needs to be put right asap, particularly as there will be few examples of this anywhere else to refer to. I could go in fi

CakePHP 3 - Where is custom datasource ?

2015-04-02 Thread Salines
Hi, I have a large number of CakePHP 2 web applications, many of them use remote data over the DataSource. I'm reading the documentation of CakePHP 3, but I can not find instructions for remote datesource. My next project also requires a custom DataSource (ArangoDB), so I planned to build it w