# |
Jun 8th 2021, 13:39 |
paolo.bragagni |
,:) |
# |
Jun 8th 2021, 13:39 |
paolo.bragagni |
till now I port (to 4) csv :P |
# |
Jun 8th 2021, 13:38 |
paolo.bragagni |
and use tinybutstrong to build their own odt template |
# |
Jun 8th 2021, 13:37 |
paolo.bragagni |
me too. cls - xlsx - and pdf |
# |
Jun 8th 2021, 13:37 |
kevin.pfeifer |
I let users download a XLSX |
# |
Jun 8th 2021, 13:36 |
paolo.bragagni |
do you advice to use other lib ? |
# |
Jun 8th 2021, 13:36 |
paolo.bragagni |
I only need pdf library to let users download as pdf index table |
# |
Jun 8th 2021, 13:34 |
neon1024 |
I was so sure I managed it before using a combination of `matching()` and `notMatching()`, but I can’t find the post now |
# |
Jun 8th 2021, 13:34 |
kevin.pfeifer |
@neon1024 sorry, but your query filtering questions are a bit too high for me so I can’t help you ,:) |
# |
Jun 8th 2021, 13:33 |
admad |
Fair enough |
# |
Jun 8th 2021, 13:32 |
paolo.bragagni |
I had in my old temp'late and I'm desperately trying to port all 'old' work in cake4 .. |
# |
Jun 8th 2021, 13:32 |
paolo.bragagni |
thanks @admad |
# |
Jun 8th 2021, 13:30 |
erwane |
i'm using it in all my projects they need PDF ... just because i know it. I like the specific text/image positioning. Every time i want to switch, i always found "html to pdf" library type, not my needs. Maybe i need to take time to test another one. |
# |
Jun 8th 2021, 13:25 |
admad |
Never used this lib so don't know what extra features it provides over alternatives like DomPdf, mpdf. |
# |
Jun 8th 2021, 13:23 |
admad |
"CORE LIBRARY STILL REQUIRES A SIGNIFICANT AMOUNT OF WORK TO BE COMPLETED" Doesn't seem it will be ready any time soon. |
# |
Jun 8th 2021, 13:17 |
kevin.pfeifer |
well the “new” version is https://github.com/tecnickcom/tc-lib-pdf and stated `UNDER DEVELOPMENT (NOT READY)` |
# |
Jun 8th 2021, 13:17 |
admad |
Or perhaps just switch to another lib. |
# |
Jun 8th 2021, 13:16 |
admad |
Also "This version should be considered obsolete, new projects should use the new version as soon it will become stable." |
# |
Jun 8th 2021, 13:12 |
kevin.pfeifer |
If a class doesn’t specify a namespace it will live in the root namespace, therefore \ And the TCPDF Class doesn’t specify any namespace (besides the fact, that its a file with 24k lines of code :nauseated_face:) https://github.com/tecnickcom/TCPDF/blob/456b794f1fae9aee5c151a1ee515aae2aaa619a3/tcpdf.php#L137 |
# |
Jun 8th 2021, 13:10 |
paolo.bragagni |
thanks @kevin.pfeifer I missed the '\' before TCPDF |
# |
Jun 8th 2021, 13:08 |
neon1024 |
Is there any way in Cake 4's ORM to query where a parent is filtered by a association using `matching()`, but where the condition is either in the association, or there is no association? So the matching conditions would be either (A) or if the association is null. Where the foreign key is in the association, so I can’t add a where `foreign_key_id` |
# |
Jun 8th 2021, 13:02 |
kevin.pfeifer |
you don’t need to load anything manually, composer does that for you |
# |
Jun 8th 2021, 13:02 |
kevin.pfeifer |
since the TCPDF Class doesn’t live in any namespace you just need to create the object via ```$pdf = new \TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);``` |
# |
Jun 8th 2021, 12:58 |
paolo.bragagni |
hi . how to include vendor classes in my helper (Tecnickcom\tcpdf;) |
# |
Jun 7th 2021, 14:34 |
paolo.bragagni |
super . thanks |
# |
Jun 7th 2021, 14:26 |
kevin.pfeifer |
I would put it above or bellow the already present use logic |
# |
Jun 7th 2021, 14:25 |
paolo.bragagni |
when I bake it via bin/cake bake all mycontroller -t mytemplateBake |
# |
Jun 7th 2021, 14:24 |
paolo.bragagni |
I'd like to put 'use Cake\Http\Cookie\Cookie; ' at the start of my controller |
# |
Jun 7th 2021, 14:22 |
paolo.bragagni |
sorry, I explain |
# |
Jun 7th 2021, 14:20 |
paolo.bragagni |
where I have to put "use .." If I want that when i bake with my template, it compares in my controller? |
# |
Jun 7th 2021, 12:50 |
admad |
We can't add methods which work only for some cases. |
# |
Jun 7th 2021, 12:49 |
admad |
The problem with that idea is there are multiple ways to add a middleware, it could be a classname string, an object or a callable, so the remove() would only work with class name strings. |
# |
Jun 7th 2021, 12:43 |
peter.harder |
@admad thanks, will check it out! I was thinking about a “remove”-method for the middleware queue, so if I add middleware that is used by 9/10 of my controllers in Application.php, I could call `$middleware->remove('HttpsEnforceMiddleware')` for that single one. Would that be a totally crazy way of handling it? |
# |
Jun 7th 2021, 12:10 |
admad |
@peter.harder a better way will be available in 4.3 https://github.com/cakephp/cakephp/pull/15558 |
# |
Jun 7th 2021, 12:09 |
kevin.pfeifer |
you mean a SQL `WHERE field IN [1,2,3,4]` ? ```$query = $articles ->find('list') ->where(['field IN' => [1,2,3,4]);``` |
# |
Jun 7th 2021, 11:46 |
etibor |
is there an easy way to use in_array function on a find('list') ? |
# |
Jun 7th 2021, 11:26 |
etibor |
hello everyone |
# |
Jun 7th 2021, 08:29 |
kevin.pfeifer |
https://book.cakephp.org/4/en/console-commands/commands.html#calling-other-commands |
# |
Jun 7th 2021, 08:06 |
turkles |
I have a bunch of Commands I use, and I want to run a different (single) command before each one, what's the best way to do this? |
# |
Jun 7th 2021, 06:47 |
slackebot |
“whiteList” array to pass to the constructor. It seem to work, but there might be a better way? |
# |
Jun 7th 2021, 06:47 |
peter.harder |
I want to redirect http to https and ```HttpsEnforcerMiddleware``` works excellent for that. But - I have one (1) controller that serves a legacy Windows-application that do not support https. Can I exclude this specific controller from being redirected? I can’t find any built in way for this, like the $csrf->skipCheckCallback. To solve it for now, I made my own copy of HttpsEnforcerMiddleware and added a |