# |
Apr 24th 2017, 08:58 |
birdy247 |
Neon1024 it looks great |
# |
Apr 24th 2017, 08:55 |
Neon1024 |
Perhaps we need a tell for the docs and tutorials |
# |
Apr 24th 2017, 08:55 |
Neon1024 |
!crud |
# |
Apr 24th 2017, 08:54 |
theaxiom |
http://www.bravo-kernel.com/2015/04/how-to-build-a-cakephp-3-rest-api-in-minutes/ |
# |
Apr 24th 2017, 08:54 |
theaxiom |
http://josediazgonzalez.com/2016/12/01/creating-a-microblogging-platform/ |
# |
Apr 24th 2017, 08:54 |
theaxiom |
Yeah |
# |
Apr 24th 2017, 08:49 |
birdy247 |
Any good tutorials for the CRUD plugin? |
# |
Apr 24th 2017, 08:30 |
technofection |
Yeah got them @theaxiom and thank you ! |
# |
Apr 24th 2017, 08:30 |
theaxiom |
You can write configuration in bootstrap.php or you can load a configuration file into Configure |
# |
Apr 24th 2017, 08:30 |
theaxiom |
You want the write/read methods |
# |
Apr 24th 2017, 08:30 |
theaxiom |
@technofection yes that is the proper documentation I was referring to |
# |
Apr 24th 2017, 08:29 |
Neon1024 |
Moin Ceeram |
# |
Apr 24th 2017, 08:29 |
Neon1024 |
Missing second param! |
# |
Apr 24th 2017, 08:29 |
theaxiom |
sorry it has been a long day, but you get the idea |
# |
Apr 24th 2017, 08:29 |
ceeram |
moin |
# |
Apr 24th 2017, 08:29 |
theaxiom |
lol |
# |
Apr 24th 2017, 08:29 |
theaxiom |
wait I think I did that wrong |
# |
Apr 24th 2017, 08:29 |
technofection |
Okay, that gives me some idea on how to do this.. Thank you ! |
# |
Apr 24th 2017, 08:28 |
theaxiom |
`Configure::write(['foo' => 'bar']); |
# |
Apr 24th 2017, 08:28 |
technofection |
This one @theaxiom https://book.cakephp.org/3.0/en/development/configuration.html |
# |
Apr 24th 2017, 08:28 |
Neon1024 |
If it’s the plugins config, you can get that from the Plugin class as well |
# |
Apr 24th 2017, 08:28 |
Neon1024 |
Events take params |
# |
Apr 24th 2017, 08:27 |
theaxiom |
@technofection store your extra data in Configure:: |
# |
Apr 24th 2017, 08:27 |
technofection |
But if I need to push some more data along with the event.. then Just the name will not help me.. I'll need those information as well |
# |
Apr 24th 2017, 08:26 |
technofection |
I see.. thank you.. I can see Plugin::loaded() function.. That will serve my purpose.. |
# |
Apr 24th 2017, 08:26 |
Neon1024 |
Returns array too, so it’s as simple as using in_array() |
# |
Apr 24th 2017, 08:25 |
Neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Core/Plugin.php#L353-L370 |
# |
Apr 24th 2017, 08:25 |
Neon1024 |
Yes, here is the method you’re looking for |
# |
Apr 24th 2017, 08:25 |
Neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Core/Plugin.php#L35 |
# |
Apr 24th 2017, 08:24 |
Neon1024 |
I’m pretty sure that plugins are registered to a registry class |
# |
Apr 24th 2017, 08:23 |
slackebot1 |
a cotnroller I can check the list of loaded plugins. |
# |
Apr 24th 2017, 08:23 |
technofection |
Also I need a funtionality, where I want to have a list of all loaded plugins (I'll load the plugins in bootstrap based on some rules). In other controllers I need to do some actions based on if a *particular* plugin is loaded or not.. From all of the plugins, I have raised a "Plugin.Loaded" event, with Plugin's name as argument.. Now I can catch this in my EventListener. But how do I create a list/registry, where I push the plugin nam |
# |
Apr 24th 2017, 08:19 |
technofection |
Ohh, never mind.. I did a bad mistake.. Marked bootstrap=>false during plugin load.. My bad .... :( |
# |
Apr 24th 2017, 08:19 |
theaxiom |
You can access it in the global event register |
# |
Apr 24th 2017, 08:18 |
technofection |
This is in plugins bootstrap file |
# |
Apr 24th 2017, 08:18 |
theaxiom |
That has been a core rule of cakephp |
# |
Apr 24th 2017, 08:18 |
technofection |
$event = new Event('Plugin.Loaded'); $event=EventManager::instance()->dispatch($event); |
# |
Apr 24th 2017, 08:18 |
technofection |
I have a custom plugin, where I am dispatching an event like |
# |
Apr 24th 2017, 08:18 |
theaxiom |
Don't ask to ask a question, it is annoying |
# |
Apr 24th 2017, 08:17 |
theaxiom |
@technofection I'm with @neon1024 on that one |
# |
Apr 24th 2017, 08:17 |
Neon1024 |
technofection, I don’t know if I can help you because you haven’t asked a question. |