# |
Apr 28th 2017, 02:34 |
chris-andre |
If name has a few options, you could validate value based on name value |
# |
Apr 28th 2017, 02:30 |
chris-andre |
posted data has nothing to do with the label or the id. |
# |
Apr 28th 2017, 02:29 |
chris-andre |
why? Posted data carries the input name. |
# |
Apr 28th 2017, 02:19 |
rrueco |
is it possible to validate a field by its label? or if not, can I use id? |
# |
Apr 27th 2017, 21:54 |
siran |
hi, is there a simpler way of removing a condition from a query? please look this gist: https://gist.github.com/siran/9cf5201987b223e00c0a4c1fb7cedbb2 |
# |
Apr 27th 2017, 21:45 |
cleptric |
Yes, you can change you AppController :slightly_smiling_face: Cake updates via `composer update`will just touch the files inside the `vendor` directory |
# |
Apr 27th 2017, 21:42 |
cleptric |
cakephp/app is a repo too :slightly_smiling_face: It’s just a starting point for your application. The cakephp/cakephp repo, which is the “core” lives in your `vendor` directory |
# |
Apr 27th 2017, 21:42 |
bigLanky |
so I can directly modify this file no problem as well? |
# |
Apr 27th 2017, 21:42 |
bigLanky |
so AppController gets created for each individual project that gets created? |
# |
Apr 27th 2017, 21:41 |
bigLanky |
can check there |
# |
Apr 27th 2017, 21:41 |
bigLanky |
I guess the github would have the core files |
# |
Apr 27th 2017, 21:41 |
bigLanky |
yeah |
# |
Apr 27th 2017, 21:41 |
cleptric |
you did sth like `composer create-project cakephp/app` |
# |
Apr 27th 2017, 21:39 |
bigLanky |
i created the app via command line and the default.ctp was created for me |
# |
Apr 27th 2017, 21:39 |
bigLanky |
how can I tell which files are part of the core and will be udpated so I konw which files not to modify? |
# |
Apr 27th 2017, 21:35 |
cleptric |
However, you could also change the layout that is rendered inside your `AppController` through the `ViewBuilder` to set it globally |
# |
Apr 27th 2017, 21:33 |
cleptric |
The `default.ctp` will never be updated by a cake update, as it’s note part of the core. So you can change it to your liking :slightly_smiling_face: |
# |
Apr 27th 2017, 21:26 |
bigLanky |
or is it safe to modify the default.ctp file? I just don't want it to get overwritten when cake updates |
# |
Apr 27th 2017, 21:26 |
bigLanky |
is there a way to change this globally or do I have to do it within each controller? |
# |
Apr 27th 2017, 21:26 |
bigLanky |
Hello, I am trying to update the default layout from default.ctp to somethingelse.ctp |
# |
Apr 27th 2017, 21:00 |
youto_us |
Hi guys, how do you deal with multiple forms and when the securityComponement isactivated. I tried to set 'secure' => 'skip' in the form's options. My forms are not targeting the same URL. The last form of the template overwrite the security token. |
# |
Apr 27th 2017, 21:00 |
admad |
https://api.cakephp.org/3.4/class-Cake.Database.Query.html#_clause |
# |
Apr 27th 2017, 20:59 |
siran |
slackebot1: thank you! |
# |
Apr 27th 2017, 20:59 |
admad |
siran: https://api.cakephp.org/3.4/class-Cake.Database.Expression.QueryExpression.html#_iterateParts |
# |
Apr 27th 2017, 20:33 |
siran |
if anyone is interested, this link addresses the issue `https://groups.google.com/forum/#!topic/cake-php/rOINCsXs2Vg` |
# |
Apr 27th 2017, 20:30 |
siran |
yes, cake 3 |
# |
Apr 27th 2017, 20:30 |
siran |
how could I modify the conditions of a query? |
# |
Apr 27th 2017, 20:30 |
Leonardo_0112 |
siran, is it cake3? |
# |
Apr 27th 2017, 20:30 |
siran |
but I cannot access the protected properties |
# |
Apr 27th 2017, 20:29 |
siran |
yes |
# |
Apr 27th 2017, 20:29 |
Leonardo_0112 |
siran, did you try debug() the parameters from beforeFind method? |
# |
Apr 27th 2017, 20:28 |
holisticnetworking |
So, @btx. Anything? |
# |
Apr 27th 2017, 20:28 |
siran |
I don't know how to interact with a query from a beforeFind if I can't access/modify the $query |
# |
Apr 27th 2017, 20:28 |
siran |
Leonardo_0112: but apparently there ir none |
# |
Apr 27th 2017, 20:27 |
siran |
Leonardo_0112: yeah. I was wondering if there was a general getter/setter |
# |
Apr 27th 2017, 20:27 |
Leonardo_0112 |
siran, protected property or method can only be accessed by the class itself or some class that extends it |
# |
Apr 27th 2017, 20:24 |
siran |
it says `Cannot access protected property Cake\ORM\Query::$_parts` |
# |
Apr 27th 2017, 20:16 |
siran |
beforeFind has a $query parameter, i'd like to access the $query->_parts property and interact with it. but since its protected I apparently can't. Is there some workaround? |
# |
Apr 27th 2017, 20:15 |
siran |
how can I access a protected property of a $query object from a Behavior ? |
# |
Apr 27th 2017, 20:15 |
siran |
hi |
# |
Apr 27th 2017, 20:13 |
btx |
@burzum2 ah that’s exactly what I’m lookin for - thanks! |