# |
Feb 9th 2018, 16:53 |
neon1024 |
But yeah, you can associate to an extended model |
# |
Feb 9th 2018, 16:52 |
neon1024 |
I stopped using that plugin because I spent too much time customising it |
# |
Feb 9th 2018, 16:50 |
jkarlmen |
because right now i'll have to rename all instances of that model in my code |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
and still refer to "Users" |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
so instead of trying to fight them I was hoping there was a way i could say "add these table relations to this plugin's model" |
# |
Feb 9th 2018, 16:49 |
jkarlmen |
which makes sense ... I'm using cakeDC's users plugin and their users model is conflicting with mine |
# |
Feb 9th 2018, 16:48 |
neon1024 |
Otherwise I have to inspect the instance to see what I’m working with, or hope I used a descriptive variable name :P |
# |
Feb 9th 2018, 16:48 |
neon1024 |
I tend to name them differently so it’s nice and obvious in my code |
# |
Feb 9th 2018, 16:48 |
jkarlmen |
huh ... now there is an idea |
# |
Feb 9th 2018, 16:48 |
neon1024 |
If you want to load both models at the same time that is |
# |
Feb 9th 2018, 16:47 |
neon1024 |
You can use the same filename and such, but you’ll have to use `$this->setAlias()` in the table class initialize method I think |
# |
Feb 9th 2018, 16:47 |
jkarlmen |
at this stage i'm about to rename my model and tell it to load the same table |
# |
Feb 9th 2018, 16:47 |
jkarlmen |
well let's give that a shot |
# |
Feb 9th 2018, 16:47 |
neon1024 |
Easy enough to test though :slightly_smiling_face: By asking the TableRegistry for it’s loaded objects |
# |
Feb 9th 2018, 16:47 |
jkarlmen |
that would explain that |
# |
Feb 9th 2018, 16:45 |
neon1024 |
At least, that’s my understanding. I’m about 65% certain on that one :P |
# |
Feb 9th 2018, 16:45 |
neon1024 |
Plugin models are usually keyed as just the model name, rather than the plugin syntax |
# |
Feb 9th 2018, 16:44 |
neon1024 |
Which essentially is just an array with the key being the name of the object and the value the instance |
# |
Feb 9th 2018, 16:44 |
neon1024 |
As the core uses the Service Locator pattern for storing the instances |
# |
Feb 9th 2018, 16:44 |
neon1024 |
You’d have to alias them if they have the same name though, due to a conflict in the ObjectRegistry |
# |
Feb 9th 2018, 16:43 |
neon1024 |
I don’t see a problem with extending a plugins model and using the application one. I do it all the time |
# |
Feb 9th 2018, 16:43 |
neon1024 |
You asked about extending plugin models? |
# |
Feb 9th 2018, 16:42 |
neon1024 |
Er, no idea. Sorry. Probably not? |
# |
Feb 9th 2018, 16:41 |
jkarlmen |
@neon1024 was that bit about callbacks directed at my question? |
# |
Feb 9th 2018, 16:25 |
neon1024 |
Yet again, I must tip my hat to entity mutator methods <3 |
# |
Feb 9th 2018, 16:22 |
neon1024 |
Heh, nice. I too keep a website of things I don’t want to forget. http://jedistirfry.co.uk/ |
# |
Feb 9th 2018, 16:22 |
loginews |
I am with you. My only issue around here is the time factor. My personal guide so that I don't forget is here: http://manuals.loginonline.net/cakephp4/ |
# |
Feb 9th 2018, 16:20 |
neon1024 |
Heh, or check out this ticket @loginews https://github.com/FriendsOfCake/bootstrap-ui/issues/193 |
# |
Feb 9th 2018, 16:19 |
neon1024 |
Let the team know what examples you’d like to see and what you think is missing |
# |
Feb 9th 2018, 16:19 |
neon1024 |
That would be super helpful :) |
# |
Feb 9th 2018, 16:19 |
neon1024 |
Sure! If you want to open a ticket on the repo https://github.com/FriendsOfCake/bootstrap-ui/issues/new |
# |
Feb 9th 2018, 16:18 |
loginews |
if I may give my opinion, it's the examples that are missing in cakephp. |
# |
Feb 9th 2018, 16:18 |
neon1024 |
Totally agree with you. The docs could with a Quick start section or similar |
# |
Feb 9th 2018, 16:18 |
neon1024 |
Oh yeah, I remember now. The setup got all silly and overcomplicated with it shipping it’s own layouts and stuff |
# |
Feb 9th 2018, 16:17 |
neon1024 |
Perhaps there is room to improve the documentation here :slightly_smiling_face: |
# |
Feb 9th 2018, 16:17 |
loginews |
thanks. I thought so too... till I spent half an hour. |
# |
Feb 9th 2018, 16:17 |
loginews |
sure |
# |
Feb 9th 2018, 16:16 |
neon1024 |
Just hooking up some js files and css files into your layout |
# |
Feb 9th 2018, 16:16 |
neon1024 |
It’s nothing complicated |
# |
Feb 9th 2018, 16:16 |
loginews |
but I will investigate. |
# |
Feb 9th 2018, 16:16 |
loginews |
better than that... but then I am surprised because since I made it work before on another server, and that I documented everything that I did, there must be something I missed that now it is not working. |