From b5a52969f7a06faa14919d33e4f6b230c29a8764 Mon Sep 17 00:00:00 2001 From: Sebastian Aleksander Thomsen Date: Tue, 21 Feb 2017 19:09:49 +0100 Subject: [PATCH 1/2] Add $this->loadModel() notation Going through the doc I noticed that this notation is missing. --- en/plugins.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/en/plugins.rst b/en/plugins.rst index cca60ba85a..83a0686104 100644 --- a/en/plugins.rst +++ b/en/plugins.rst @@ -442,6 +442,9 @@ You can use ``TableRegistry`` to load your plugin tables using the familiar $contacts = TableRegistry::get('ContactManager.Contacts'); +Alternatively you can use: + + $this->loadModel('ContactsMangager.Contacts'); Plugin Views ============ From 5c19e66d93f92508b8c2a510a05894455248e2c3 Mon Sep 17 00:00:00 2001 From: Sebastian Aleksander Thomsen Date: Wed, 22 Feb 2017 10:12:17 +0100 Subject: [PATCH 2/2] Incorporated suggestions. --- en/plugins.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/plugins.rst b/en/plugins.rst index 83a0686104..95a99eeeea 100644 --- a/en/plugins.rst +++ b/en/plugins.rst @@ -442,7 +442,7 @@ You can use ``TableRegistry`` to load your plugin tables using the familiar $contacts = TableRegistry::get('ContactManager.Contacts'); -Alternatively you can use: +Alternatively, from a controller context, you can use:: $this->loadModel('ContactsMangager.Contacts');