Log message #4208776

# At Username Text
# Oct 14th 2019, 17:51 david I have deleted /plugins/MyPlugin/src/Shell
# Oct 14th 2019, 17:50 david new code
# Oct 14th 2019, 17:50 graziel hm is it updated code or new?
# Oct 14th 2019, 17:49 david same result
# Oct 14th 2019, 17:48 graziel bake is great i use it everytime i can
# Oct 14th 2019, 17:48 david (didn't know)
# Oct 14th 2019, 17:48 david ok, I'll try
# Oct 14th 2019, 17:48 david oh
# Oct 14th 2019, 17:47 graziel why move bake has ability to bake into plugin
# Oct 14th 2019, 17:47 david I have baked a shell and moved to /plugins/MyPlugin/src/Shell, with the same result: commands not found by ./cake
# Oct 14th 2019, 17:42 david in fact, my plugin only have the shell
# Oct 14th 2019, 17:41 graziel try baking just to be sure its not typo or silly mistake
# Oct 14th 2019, 17:41 david no
# Oct 14th 2019, 17:41 graziel are you using bake to create it?
# Oct 14th 2019, 17:38 david if my shell is under src/Shell it works, but when I move the shell to /plugins/MyPlugin/src/Shell. commands are missing
# Oct 14th 2019, 17:27 david but MyPlugin shell commands are not autodiscovered when I run ./cake
# Oct 14th 2019, 17:27 david yes, I loaded the plugin via ./cake plugin load MyPlugin, so Application.php has been updated with $this->addPlugin('MyPlugin');
# Oct 14th 2019, 17:24 dereuromark If you loaded/enabled the plugin.
# Oct 14th 2019, 17:20 david When a plugin has a shell, the shell commands should be showed in console when you run ./cake, isn't it?
# Oct 14th 2019, 16:25 jotpe Thanks :slightly_smiling_face:
# Oct 14th 2019, 16:25 jotpe Alright, I changed this.
# Oct 14th 2019, 16:22 admad that looks fine but unlike `getPath()` `getRequestTarget()` will include query string
# Oct 14th 2019, 16:17 jotpe I don't need to inject other classes so this should be fine, or?
# Oct 14th 2019, 16:17 slackebot1 <jotpe>
# Oct 14th 2019, 16:17 jotpe @admad Yes, i used this. I ended up building a helper with something like this:
# Oct 14th 2019, 16:05 admad @jotpe `$this->request->getPath()` will return the current URL without query string args if any
# Oct 14th 2019, 15:58 jotpe Thanks @tobse, @dereuromark and @admad
# Oct 14th 2019, 15:52 admad a more generic solution would be generate URL for record and compare with current request's URL. Then you will be able to use the check for any record, not just companies
# Oct 14th 2019, 15:50 dereuromark wrapping it inside helpers maybe :slightly_smiling_face:
# Oct 14th 2019, 15:46 tobse I'm using the request object in my menu-elements. I.e. ''' if ($this->request->getParam('controller') === 'Companies' andand $this->request->getParam('pass')[0] === strtolower($company->slug)) { $active = ' active'; $current = ' <span class="sr-only">' . __x('Navigation', '(current)') . '</span>'; }''' Maybe there is a much more elegant way. :slightly_smiling_face:
# Oct 14th 2019, 15:40 jotpe What's the proper way to get the current request url within a view? E.g. for set the current active link in a menu in a element?
# Oct 14th 2019, 15:12 ricksaccous that's cool man, hopefully you can maintain it easily enough
# Oct 14th 2019, 15:12 ricksaccous lol jk
# Oct 14th 2019, 15:12 ricksaccous HERETIC LEAVE THIS CHANNEL AT ONCE
# Oct 14th 2019, 15:11 nils I moved to Laravel a while back. That’s my new god. I only have one project to maintain in Cakephp :slightly_smiling_face:
# Oct 14th 2019, 15:10 ricksaccous BELIEVE MY FRIEND AND YOU WILL ACHIEVE
# Oct 14th 2019, 15:09 nils :)
# Oct 14th 2019, 15:09 ricksaccous you gotta believe
# Oct 14th 2019, 15:08 nils Not attitude problems, age problems. I started out too late. :slightly_smiling_face:
# Oct 14th 2019, 15:07 ricksaccous not with that attitude
# Oct 14th 2019, 15:06 nils Haha, I will never become victorious in the developer-scene.