# |
May 16th 2019, 06:04 |
neofutur |
but i cant find the good syntax :( |
# |
May 16th 2019, 06:03 |
neofutur |
soething like -> where (['Prospects.email'] => NOT NULL AND NOT EMPTY ); |
# |
May 16th 2019, 05:57 |
neofutur |
i need to pass a condition to the contain table , to check that a field is NOT NULL and also nt empty |
# |
May 16th 2019, 05:57 |
neofutur |
hi all, I could use some help about https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#passing-conditions-to-contain |
# |
May 15th 2019, 18:30 |
m.hoffs |
ok, next step, empty pdf |
# |
May 15th 2019, 18:28 |
m.hoffs |
couldnt get my finger behind it |
# |
May 15th 2019, 18:28 |
m.hoffs |
digging and debugging |
# |
May 15th 2019, 18:28 |
m.hoffs |
2 days |
# |
May 15th 2019, 18:27 |
ricksaccous |
;) |
# |
May 15th 2019, 18:27 |
m.hoffs |
if($this->response->getType() != 'application/pdf'){ $this->viewBuilder()->setClassName('AdminLTE.AdminLTE'); } |
# |
May 15th 2019, 18:27 |
ricksaccous |
no problem ;) |
# |
May 15th 2019, 18:26 |
m.hoffs |
big thank you! |
# |
May 15th 2019, 18:26 |
m.hoffs |
nice nice nice |
# |
May 15th 2019, 18:24 |
m.hoffs |
can do that filter on extension |
# |
May 15th 2019, 18:23 |
m.hoffs |
enough for me to dig out |
# |
May 15th 2019, 18:23 |
m.hoffs |
ok ok |
# |
May 15th 2019, 18:23 |
ricksaccous |
that's an example |
# |
May 15th 2019, 18:23 |
ricksaccous |
if ($this->getRequest()->getParam('someparam') !== in_array(['pdf', 'json']) { } |
# |
May 15th 2019, 18:22 |
ricksaccous |
yeah |
# |
May 15th 2019, 18:22 |
m.hoffs |
it is in my appcontroller |
# |
May 15th 2019, 18:22 |
ricksaccous |
you can set it based on router params with if statements |
# |
May 15th 2019, 18:22 |
m.hoffs |
hmmm |
# |
May 15th 2019, 18:22 |
ricksaccous |
not all the time |
# |
May 15th 2019, 18:22 |
m.hoffs |
so thats allready a win win |
# |
May 15th 2019, 18:22 |
ricksaccous |
you want to only set that view class conditionally |
# |
May 15th 2019, 18:22 |
ricksaccous |
yep |
# |
May 15th 2019, 18:22 |
ricksaccous |
heh |
# |
May 15th 2019, 18:21 |
m.hoffs |
it start serving a pdf |
# |
May 15th 2019, 18:21 |
m.hoffs |
$this->viewBuilder()->setClassName('AdminLTE.AdminLTE'); |
# |
May 15th 2019, 18:21 |
m.hoffs |
when i uncomment this one |
# |
May 15th 2019, 18:21 |
m.hoffs |
but u cracked if a bit |
# |
May 15th 2019, 18:21 |
ricksaccous |
ok |
# |
May 15th 2019, 18:21 |
m.hoffs |
yes |
# |
May 15th 2019, 18:21 |
ricksaccous |
it should be according to the plugin docs |
# |
May 15th 2019, 18:21 |
ricksaccous |
is your url with '_ext' => 'pdf'? |
# |
May 15th 2019, 18:20 |
ricksaccous |
also |
# |
May 15th 2019, 18:19 |
m.hoffs |
ok |
# |
May 15th 2019, 18:19 |
ricksaccous |
$this->viewBuilder()->setClass or something? |
# |
May 15th 2019, 18:19 |
ricksaccous |
heh |
# |
May 15th 2019, 18:19 |
m.hoffs |
i `m not so expert |
# |
May 15th 2019, 18:19 |
ricksaccous |
well i was basically stopping cake from giving me json serializable magic and json views |