Log message #4155719

# At Username Text
# Jul 4th 2018, 13:54 neon1024 The requirement is that they inherit from a Master Script, and blocks can be individually overwritable in child scripts
# Jul 4th 2018, 13:53 neon1024 I have a software requirement that I’m struggling to figure out. I am creating Scripts, a spoken script this is. They are comprised of Script Blocks.
# Jul 4th 2018, 13:25 josbeir i think i only used that once or twice myself
# Jul 4th 2018, 13:25 lubos i am sure it is :slightly_smiling_face: will have more play when there is time :slightly_smiling_face:
# Jul 4th 2018, 13:25 josbeir it is more straightforward but mapreduce is pretty powerfull too :slightly_smiling_face:
# Jul 4th 2018, 13:25 lubos in compare to mapReduce
# Jul 4th 2018, 13:24 lubos I think so too, for me it is much easier to use
# Jul 4th 2018, 13:24 josbeir but it is very complex to gras for new folks
# Jul 4th 2018, 13:24 josbeir formatResults should imo be more emphasised in documentation, most things refer to map reduce
# Jul 4th 2018, 13:23 josbeir glad it worked! :slightly_smiling_face:
# Jul 4th 2018, 13:23 lubos File uploaded https://cakesf.slack.com/files/UBEC23Z6H/FBKV67PMM/-.txt / https://slack-files.com/T053DPNCM-FBKV67PMM-3580021e0c - <@UAG1HNWKT> and <@U51A5M2DS> thanks for help with formatResults, it works like a dream ... here is what I came up with
# Jul 4th 2018, 13:22 lubos File uploaded https://cakesf.slack.com/files/UBEC23Z6H/FBJB85FJM/-.txt / https://slack-files.com/T053DPNCM-FBJB85FJM-298ade22c6
# Jul 4th 2018, 13:03 lubos at form with $offer entity
# Jul 4th 2018, 13:03 lubos @pmoraes `$this->Form->control('suppressed._ids')`
# Jul 4th 2018, 13:02 neon1024 You’ll need to tell Cake to use your new class, where ever that is, I guess in your Acl configuration
# Jul 4th 2018, 12:30 pmoraes @lubos and your form how is it?
# Jul 4th 2018, 12:02 mark alright. :)
# Jul 4th 2018, 11:57 admad so will need proper check to decide when to extend
# Jul 4th 2018, 11:56 admad but thats hackish and you could end up with a loop if not careful
# Jul 4th 2018, 11:55 mark alright, :) let me figure that out. thank you admad!
# Jul 4th 2018, 11:54 ldsign Can you have a look?
# Jul 4th 2018, 11:54 ldsign namespace App\Model\Entity; use Acl\Model\Entity\Aco as ParentAco; class Aco extends ParentAco { protected $_virtual = ['text']; /** * Create virtual field "text" * * @return string text */ protected function _getText() { if (empty($this->_properties['text'])) { return $this->_properties['alias']; } return $this->_properties['text']; } }
# Jul 4th 2018, 11:54 ldsign Thanks - Ive tried that but it does not work :(
# Jul 4th 2018, 11:52 admad @mark you can try overring View::_evaluate() and adding the `extend()` call before `include` statement
# Jul 4th 2018, 11:50 mark oops
# Jul 4th 2018, 11:50 cliper hi guys, trying to sort this out quick, so im pasting into multiple support channels atm
# Jul 4th 2018, 11:48 mark Hi guys, just a quick question. :) is there a way to extend a view template in AppView class? I'm looking for a solution on not repeating any code that I put in my template.ctp file that looks like this: $this->extend('../Layout/TwitterBootstrap/dashboard'); and want to move it to AppView so I could just define like, if ($this->requests->controller) are Pages, Dealers, or whatever I could just use that extend statement there.. :)
# Jul 4th 2018, 11:31 josbeir $request = $this->getRequest()->withData('key', 'value'); $this->setRequest($request); $this->Crud->execute();
# Jul 4th 2018, 11:30 josbeir if you really want to manipulate request data in your controller you could just do that in your action and then call $this->Crud->execute(), havent done that myself but should work
# Jul 4th 2018, 11:28 josbeir but if we are talking about marshalling, beforeMarshal will probably be fine in most cases i think
# Jul 4th 2018, 11:27 josbeir not really, beforeSave can be used to perform controller logic before saving
# Jul 4th 2018, 11:27 lubos but since it is in model, as you said (again correct) than this is nonsense event
# Jul 4th 2018, 11:27 lubos http://crud.readthedocs.io/en/latest/events.html#crud-beforesave
# Jul 4th 2018, 11:27 lubos like Crud.beforeSave
# Jul 4th 2018, 11:26 lubos i meant if there is something like Crud.beforeMarshal event
# Jul 4th 2018, 11:26 josbeir so that should work
# Jul 4th 2018, 11:26 josbeir beforeMarshal is in the table, not controller
# Jul 4th 2018, 11:25 lubos just trying to do workaround for form helper _ids which does not support joinData
# Jul 4th 2018, 11:25 lubos anyone using Crud plugin, how to adjust data before marshaling? there is no such event as beforeMarshal. so I guess in edit I just do if request is put then and adjust data, right?
# Jul 4th 2018, 11:24 lubos :+1:
# Jul 4th 2018, 11:23 josbeir ;)