Log message #4049187

# At Username Text
# Jul 7th 2017, 11:06 neon1024 Hey @dereuromark did you ever get any cake 3 code together for this? http://www.dereuromark.de/2012/02/26/bitmasked-using-bitmasks-in-cakephp/
# Jul 7th 2017, 10:10 jarard01 is there another way?
# Jul 7th 2017, 10:07 hmic for 2.x, thats the sad solution...
# Jul 7th 2017, 10:06 neon1024 Then just made `function getMeStuffWithSparkles() { return $this->find('first', $etc); }`
# Jul 7th 2017, 10:05 neon1024 Not sure if it’s the ‘correct’ way to do things, but I hit the same issue you have. So ended up just making `$this->Example->getMeStuffWithSparkles()`
# Jul 7th 2017, 10:04 neon1024 All of it in fact
# Jul 7th 2017, 10:04 jarard01 neon1024, so you move most of the query into the custom finder?
# Jul 7th 2017, 10:03 neon1024 jarard01, In those situations I’ve always ended up just creating a model method which does a whole find and returns the resulting array
# Jul 7th 2017, 10:02 jay Number 1) Upgrade your version.
# Jul 7th 2017, 10:00 jarard01 it looks like the results is a find all
# Jul 7th 2017, 10:00 jarard01 how can i force a custom finder to use first in cake2
# Jul 7th 2017, 09:59 jay Is there an open source for the GH feed for slack? Was gonna add Phinx to it
# Jul 7th 2017, 09:53 neon1024 ..and a lick of paint in the base wouldn’t go amiss
# Jul 7th 2017, 09:53 neon1024 Really? Can you fix the coffee machine
# Jul 7th 2017, 09:45 adriencs but all your base are belongs to us :trollface:
# Jul 7th 2017, 09:44 adriencs decision does not belongs to me :(
# Jul 7th 2017, 09:41 dereuromark You should already have done that months ago^^
# Jul 7th 2017, 09:41 dereuromark Update
# Jul 7th 2017, 09:32 adriencs shat I'm on cake 3.2
# Jul 7th 2017, 09:29 adriencs <3
# Jul 7th 2017, 09:28 dereuromark IDE helper plugin See awesome list
# Jul 7th 2017, 09:28 adriencs @hmic thanks, any link ?
# Jul 7th 2017, 09:28 hmic if not, you can just add the annotations to your view file like: <?php /* @property \Cake\View\Helper\HtmlHelper $Html */ ?> in he top of the .ctp
# Jul 7th 2017, 09:26 hmic adriencs: dereuromark has written an integration for phpstorm, don't know if it does that automatically
# Jul 7th 2017, 09:26 hmic you can use that finder whereever you need to and add other conditions and things to it, just like you do now with a $table->find()->...
# Jul 7th 2017, 09:26 adriencs How can I tell PHPStorm to find the declaration of Helper in .ctp ?
# Jul 7th 2017, 09:25 hmic exactly
# Jul 7th 2017, 09:23 jarard01 and that will slip the condition in on my behalf without having to write a join for each occurrence right?
# Jul 7th 2017, 09:23 jarard01 ok so then it would be a case of using the custom finder where the security is required i guess
# Jul 7th 2017, 09:22 hmic jarard01: same answer basically: just use a custom finder that adds the joins and conditions you need
# Jul 7th 2017, 09:21 junichirojp Hi @megan
# Jul 7th 2017, 09:21 jarard01 can I do this in before find, trying to figure a way to do this with out adding joins all over the controller
# Jul 7th 2017, 09:20 jarard01 any suggestions how I might deal with this... Style belongsTo BrandStore, and BrandStore belongs to Store. When I do a find on Styles I want to only allow a find where the current Store owns the BrandStore
# Jul 7th 2017, 08:53 hmic you could have the beforeFind in a behavior and attach/detach that as needed. still i think a custom finder to add the condition is the easiest
# Jul 7th 2017, 08:53 jarard01 ty
# Jul 7th 2017, 08:53 jarard01 hmic, i like that - it's the solution
# Jul 7th 2017, 08:52 hmic jarard01, you cannot. and you might rather use a custom finder instead of a beforeFind, maybe?
# Jul 7th 2017, 08:48 jarard01 Good morning fellow Bakies. Something that has been troubling me. I am using a 'where model.active =1' on my beforeFind. I don't want this applied when in admin routing. how can i toggle the before find?
# Jul 7th 2017, 08:30 neon1024 Sorry, I mean, has anyone found a bitwise operator plugin for cake?
# Jul 7th 2017, 08:29 neon1024 Anyone know if there a behaviour for dealing with bitwise operators in cakephp
# Jul 7th 2017, 08:20 pidlo ok sorry for all this error is from old piece of code from cakephp2 now is validation ok