# |
Apr 23rd 2017, 09:04 |
ayakut |
http://stackoverflow.com/questions/43566928/how-can-i-call-beforesave-methods-recursively-while-saving-associative-data-in-c |
# |
Apr 23rd 2017, 09:03 |
ayakut |
Hi guys I am really stuck! Can anyone answer that question |
# |
Apr 23rd 2017, 09:02 |
cakephp534 |
Hey guys, I have hours with a leading zero ( date('H') ) and I want to add a certain number of hours to the calculation, however when I do date('H') + $i, the resulting number loses its leading zero, what's the beast way to add hours ánd maintaint the leading zero? |
# |
Apr 23rd 2017, 08:20 |
dakota |
@theaxiom `->associations()->remove('Ba')` |
# |
Apr 23rd 2017, 08:08 |
ra7bi |
can i use Sqlite with bake ? |
# |
Apr 23rd 2017, 08:08 |
ra7bi |
hey |
# |
Apr 23rd 2017, 08:06 |
admad |
@theaxiom it's not just for sidebar. If you can't find in docs searh for scaffold.associations_blacklist in the view listener code |
# |
Apr 23rd 2017, 07:46 |
appnerd |
cant even get errors because wont call line after the save function |
# |
Apr 23rd 2017, 07:46 |
appnerd |
hey in cakephp how come when save fails it is ending my controller and showing the view |
# |
Apr 23rd 2017, 07:44 |
theaxiom |
Because the whitelist/blacklist only applies to the sidebar navigation. When I am viewing a user record it is still trying to generate a link to Muffin/Tokenize tokens |
# |
Apr 23rd 2017, 07:43 |
theaxiom |
Or is that not a feature of CakePHP 3? |
# |
Apr 23rd 2017, 07:43 |
theaxiom |
Regardless, is there a way to remove associations on the fly? |
# |
Apr 23rd 2017, 07:34 |
theaxiom |
I guess I should RTFM :) |
# |
Apr 23rd 2017, 07:31 |
theaxiom |
It is generating links based on associations |
# |
Apr 23rd 2017, 07:31 |
theaxiom |
https://github.com/FriendsOfCake/crud-view/blob/master/src/Template/Element/view/related/has_many.ctp#L20 |
# |
Apr 23rd 2017, 07:30 |
theaxiom |
https://github.com/FriendsOfCake/crud-view/blob/master/src/Template/Element/view/related.ctp#L2 |
# |
Apr 23rd 2017, 07:29 |
theaxiom |
the problem is, when generating the views it is throwing up an exception for a missing route |
# |
Apr 23rd 2017, 07:29 |
theaxiom |
@admad I wasn't aware of that, thanks |
# |
Apr 23rd 2017, 07:19 |
admad |
Crud view has option to blacklist/whitelist associations |
# |
Apr 23rd 2017, 07:17 |
admad |
How does model association affect routing? |
# |
Apr 23rd 2017, 06:40 |
theaxiom |
CakePHP 2 had unbindModel() |
# |
Apr 23rd 2017, 06:38 |
theaxiom |
Therefore I am getting a missing route. |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
The problem I am having is with the crud-view plug-in, since all views are being generated dynamically it wants a route to the Muffin/Tokenize controller. |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
:slightly_smiling_face: |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
Please? |
# |
Apr 23rd 2017, 06:33 |
theaxiom |
How do I remove a model association on the fly? |
# |
Apr 23rd 2017, 01:12 |
hiromi2424 |
dereuromark thanks to notice it. I will look into it :slightly_smiling_face: |
# |
Apr 22nd 2017, 17:03 |
dereuromark |
I mainly want a few people to help me out, and I can give them easy access via rbac to the backend |
# |
Apr 22nd 2017, 17:03 |
dereuromark |
a few of the main benefits over normal po editing are outlined in the root readme |
# |
Apr 22nd 2017, 16:47 |
admad |
Just improving the translations if needed? |
# |
Apr 22nd 2017, 16:46 |
admad |
But if you can get po files done why use db? |
# |
Apr 22nd 2017, 16:43 |
dereuromark |
Currently playing around with some free APIs to auto translate, gonna be interesting how accurate those are for auto-suggestions and alike |
# |
Apr 22nd 2017, 16:43 |
dereuromark |
Yeah, I think it is a bridge solution between the extremes somewhere |
# |
Apr 22nd 2017, 16:35 |
admad |
If that suits your use case sounds fine. Extracting to pot/po and then to db is not something i need |
# |
Apr 22nd 2017, 16:27 |
dereuromark |
OK. My thoughts: https://github.com/dereuromark/cakephp-translate/tree/master/docs#translation-strategies |
# |
Apr 22nd 2017, 16:26 |
admad |
I never had to worry about syncing updated translations to live server. Have only used it for smallish apps where translations are directly added to live server through webui |
# |
Apr 22nd 2017, 16:25 |
dereuromark |
Was wondering about translation strategy, when doing direct extract and read via DB and deployment. So the translations are available on the live server. |
# |
Apr 22nd 2017, 16:24 |
dereuromark |
hah ok :slightly_smiling_face: |
# |
Apr 22nd 2017, 16:24 |
admad |
@dereuromark on mobile :) |
# |
Apr 22nd 2017, 16:01 |
dereuromark |
@admad Are you around? I have seen your i18n extractor and reader. |
# |
Apr 22nd 2017, 15:25 |
chrisso |
`Argument 1 passed to Cake\ORM\Behavior::__construct() must be an instance of Cake\ORM\Table, none given, called in /home/vagrant/Apps/tools.dev/tests/TestCase/Model/Behavior/CsvImportBehaviorTest.php on line 28 and defined in [/home/vagrant/Apps/tools.dev/vendor/cakephp/cakephp/src/ORM/Behavior.php, line 152]` |