# |
Nov 24th 2017, 09:37 |
neon1024 |
When is 4.0 coming? |
# |
Nov 24th 2017, 09:37 |
neon1024 |
<3 |
# |
Nov 24th 2017, 09:37 |
neon1024 |
Suppose not as it’s immutable |
# |
Nov 24th 2017, 09:36 |
neon1024 |
Wonder if there any side effects of modifying the request in a template |
# |
Nov 24th 2017, 09:36 |
neon1024 |
Yes, it is :slightly_smiling_face: |
# |
Nov 24th 2017, 09:26 |
neon1024 |
In a template `$this` is an instance of View class right? |
# |
Nov 24th 2017, 09:21 |
rudy1976s |
good morning , since cells are “mini controllers” is there a way to load from the registrya a component ? |
# |
Nov 24th 2017, 09:13 |
cholthipaul |
can I use cakephp DBAL standalone? does it have dependencies on the main framework |
# |
Nov 24th 2017, 08:30 |
birdy247 |
I am looking at the crud plugin :) |
# |
Nov 24th 2017, 08:28 |
birdy247 |
easy solution, just tire yourself out more by solving even more problems :slightly_smiling_face: |
# |
Nov 24th 2017, 08:28 |
birdy247 |
@neon1024 brain whizzing no doubt |
# |
Nov 24th 2017, 08:26 |
kants_ |
Is anyone familiar with this ? |
# |
Nov 24th 2017, 08:26 |
kants_ |
or should i need to use simple $this->request->session()->write() to add custom variable in session |
# |
Nov 24th 2017, 08:25 |
kants_ |
I want to add a custom variable in default auth array i.e $this->request->session()->read('Auth.User') is ther any way to do it ? |
# |
Nov 24th 2017, 08:24 |
kants_ |
hi #slackebot2 |
# |
Nov 24th 2017, 08:19 |
neon1024 |
Kinda sucks |
# |
Nov 24th 2017, 08:19 |
neon1024 |
Had trouble sleep the last week or so, I keep waking up in the night so I get up tired |
# |
Nov 24th 2017, 08:19 |
neon1024 |
Well if you mean I’m on time, yes :P |
# |
Nov 24th 2017, 08:17 |
birdy247 |
@neon1024 early bird :muscle: |
# |
Nov 24th 2017, 08:17 |
birdy247 |
Morning |
# |
Nov 24th 2017, 08:08 |
kants_ |
can we add a custom fields to user.auth array in cakephp 3.0 ? |
# |
Nov 24th 2017, 01:34 |
voycey |
I would just rewrite your code so those errors dont happen |
# |
Nov 23rd 2017, 22:20 |
ziemmowit |
for eg. try { [code here] } catch(\PDOException $e) { return $this->redirect(['action' => 'search']); } Renders 500. When I tried \Exception also didn't worked. |
# |
Nov 23rd 2017, 21:56 |
slackebot2 |
the exception is catched faster by Cake and generates error 500; |
# |
Nov 23rd 2017, 21:56 |
ziemmowit |
Hello, does anybody knows how can I catch exceptions in query in controllers? $stars = $this->Stars->find('all'); $stars->join([ 'coo' => [ 'table' => 'coordinates', 'type' => 'LEFT', 'conditions' => 'coo.star_id = Stars.id']]); $stars->distinct(['Stars.id']); $stars->where($str); $stars->limit(100); I would like to to catch the error when `id` or `$str` will generate an error. When I try simple try/catch() nothing happens - seems like |
# |
Nov 23rd 2017, 21:54 |
ziemmowit |
Hello, does anybody knows how can I catch exceptions in query in controllers? $stars = $this->Stars->find('all'); $stars->join([ 'coo' => [ 'table' => 'coordinates', 'type' => 'LEFT', 'conditions' => 'coo.star_id = Stars.id']]); $stars->distinct(['Stars.id']); $stars->where($str); $stars->limit(100); |
# |
Nov 23rd 2017, 20:33 |
mmalex |
hello, any input on https://stackoverflow.com/questions/46215518/cakephp-3-save-empty-belongstomany-relation ? |
# |
Nov 23rd 2017, 18:33 |
admad |
`->config()` |
# |
Nov 23rd 2017, 18:05 |
felix |
when i print `$ds` the config is public |
# |
Nov 23rd 2017, 17:55 |
felix |
how can i retrieve the hostname of a datasource config in cakephp 3? i load the connection by `$ds = ConnectionManager::get($connectionName);` but how do i get the config? `$ds->config` doesn't work |
# |
Nov 23rd 2017, 16:04 |
rajaslack |
Anyone can help me |
# |
Nov 23rd 2017, 15:51 |
rudy1976s |
@neon1024 sounds good indeed |
# |
Nov 23rd 2017, 15:48 |
neon1024 |
`class AppView extends RudyView` |
# |
Nov 23rd 2017, 15:48 |
neon1024 |
So why not extend your projects AppView from your plugins AppView? |
# |
Nov 23rd 2017, 15:46 |
rudy1976s |
@neon1024 I completely agree to extend rather than replacing. |
# |
Nov 23rd 2017, 15:44 |
neon1024 |
Which seems logical |
# |
Nov 23rd 2017, 15:44 |
neon1024 |
This book says to use the `viewBuilder` https://book.cakephp.org/3.0/en/views.html#creating-your-own-view-classes |
# |
Nov 23rd 2017, 15:43 |
neon1024 |
Replacing AppView strikes me as something which would cause me a maintenance headache later on, when I tried to say, load a new helper or something. As I wouldn’t be able to without editing the plugin, or changing the application config |
# |
Nov 23rd 2017, 15:42 |
neon1024 |
Or make it a class alias perhaps? |
# |
Nov 23rd 2017, 15:41 |
neon1024 |
Perhaps it’s as simple as changing the `initialize` method in `src/View/AppView` to be `$rudy = new Rudy(); $rudy->initialize()` |
# |
Nov 23rd 2017, 15:39 |
neon1024 |
You’ll have to find it in the source code |