From a76a9fe0b7579abad4ef34ce1dc6ff701212deb2 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Jan 2019 22:08:31 +0100 Subject: [PATCH 1/5] Fix note display Signed-off-by: Roeland Jago Douma --- developer_manual/app/requests/container.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/app/requests/container.rst b/developer_manual/app/requests/container.rst index 9c927db64..9a2c56294 100644 --- a/developer_manual/app/requests/container.rst +++ b/developer_manual/app/requests/container.rst @@ -58,7 +58,7 @@ Using a container ----------------- .. note:: Please do use automatic dependency injection (see below). For most -apps there is no need to register services manually. + apps there is no need to register services manually. Passing dependencies into the constructor rather than instantiating them in the constructor has the following drawback: Every line in the source code where From f5db83ece5493ad0285d0643264f225f829455e6 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Jan 2019 22:16:41 +0100 Subject: [PATCH 2/5] Fix reference Signed-off-by: Roeland Jago Douma --- developer_manual/app/classloader.rst | 4 ++-- developer_manual/app/requests/controllers.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_manual/app/classloader.rst b/developer_manual/app/classloader.rst index ed009eb7b..489bb5179 100644 --- a/developer_manual/app/classloader.rst +++ b/developer_manual/app/classloader.rst @@ -1,8 +1,8 @@ +.. _appclassloader: + =========== Classloader =========== - -.. app_classloader: .. sectionauthor:: Bernhard Posselt The classloader is provided by Nextcloud and loads all your classes automatically. The only thing left to include by yourself are 3rdparty libraries. Those should be loaded in :file:`lib/AppInfo/Application.php`. diff --git a/developer_manual/app/requests/controllers.rst b/developer_manual/app/requests/controllers.rst index 502375e1d..2e8f4c034 100644 --- a/developer_manual/app/requests/controllers.rst +++ b/developer_manual/app/requests/controllers.rst @@ -28,7 +28,7 @@ To create a controller, simply extend the Controller class and create a method t Connecting a controller and a route ----------------------------------- -If you use a proper namespace for your app (see :ref:`app_classloader`) Nextcloud +If you use a proper namespace for your app (see :ref:`appclassloader`) Nextcloud will resolve your controller and its dependencies automatically. An example route name would look like this:: From bfc01a1de8c301ba433f2778c067130f35fac0fe Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Jan 2019 22:18:37 +0100 Subject: [PATCH 3/5] Fix routes syntax highlight Signed-off-by: Roeland Jago Douma --- developer_manual/app/requests/routes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/app/requests/routes.rst b/developer_manual/app/requests/routes.rst index 7a8113ad3..12dc6864d 100644 --- a/developer_manual/app/requests/routes.rst +++ b/developer_manual/app/requests/routes.rst @@ -138,7 +138,7 @@ can be abbreviated by using the **resources** key: [ - 'author' => [url' => '/authors'], + 'author' => ['url' => '/authors'], ], 'routes' => [ // your other routes here From 952d21cf6f926c79379f791c89a3ec6e8838f609 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Jan 2019 22:20:30 +0100 Subject: [PATCH 4/5] Fix tutorial and link to migrations Signed-off-by: Roeland Jago Douma --- developer_manual/app/tutorial.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_manual/app/tutorial.rst b/developer_manual/app/tutorial.rst index eae2631e1..bd3f49a93 100644 --- a/developer_manual/app/tutorial.rst +++ b/developer_manual/app/tutorial.rst @@ -211,9 +211,9 @@ Database -------- Now that the routes are set up and connected the notes should be saved in the - database. To do that first create a :doc:`database migration ` - by creating a file **ownnotes/lib/Migration/VersionXXYYZZDateYYYYMMDDHHSSAA**, - so for example **ownnotes/lib/Migration/Version000000Date20181224140601**"" +database. To do that first create a :doc:`database migration ` +by creating a file **ownnotes/lib/Migration/VersionXXYYZZDateYYYYMMDDHHSSAA**, +so for example **ownnotes/lib/Migration/Version000000Date20181224140601**"" .. code-block:: php From dd402e4aa86a4e10eaed9d934196fc25515eee64 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Jan 2019 22:26:24 +0100 Subject: [PATCH 5/5] Fix two-factor-provider links Signed-off-by: Roeland Jago Douma --- developer_manual/app/two-factor-provider.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/developer_manual/app/two-factor-provider.rst b/developer_manual/app/two-factor-provider.rst index b6c88b398..1242e9a4b 100644 --- a/developer_manual/app/two-factor-provider.rst +++ b/developer_manual/app/two-factor-provider.rst @@ -9,7 +9,7 @@ Two-factor auth providers apps are used to plug custom second factors into the N Implementing a simple two-factor auth provider ---------------------------------------------- -Two-factor auth providers must implement the ``OCP\Authentication\TwoFactorAuth\IProvider ``_ interface. The +Two-factor auth providers must implement the `OCP\\Authentication\\TwoFactorAuth\\IProvider `_ interface. The example below shows a minimalistic example of such a provider. .. code-block:: php @@ -124,7 +124,7 @@ Providing an icon (optional) ---------------------------- To enhance how a provider is shown in the list of selectable providers on the login page, an icon -can be specified. For that the provider class must implement the ``IProvidesIcons ``_ +can be specified. For that the provider class must implement the `IProvidesIcons `_ interface. The light icon will be used on the login page, whereas the dark one will be placed next to the heading of the optional personal settings (see below). @@ -134,7 +134,7 @@ Provide personal settings (optional) Like other Nextcloud apps, two-factor providers often require user configuration to work. In Nextcloud 15 a new, consolidated two-factor settings section was added. To add personal provider settings there, -a provider must implement the ``IProvidesPersonalSettings ``_ +a provider must implement the `IProvidesPersonalSettings `_ interface. @@ -142,7 +142,7 @@ Make a provider activatable by the admin (optional) --------------------------------------------------- In order to make it possible for an admin to enable the provider for a given user via the occ -command line tool, it's necessary to implement the ``OCP\Authentication\TwoFactorAuth\IActivatableByAdmin ``_ +command line tool, it's necessary to implement the `OCP\\Authentication\\TwoFactorAuth\\IActivatableByAdmin `_ interface. As described in the linked interface documentation, this should only be implemented for providers that need no user interaction when activated. @@ -151,6 +151,6 @@ Make a provider deactivatable by the admin (optional) ----------------------------------------------------- In order to make it possible for an admin to disable the provider for a given user via the occ -command line tool, it's necessary to implement the ``OCP\Authentication\TwoFactorAuth\IDeactivatableByAdmin ``_ +command line tool, it's necessary to implement the `OCP\\Authentication\\TwoFactorAuth\\IDeactivatableByAdmin `_ interface. As described in the linked interface documentation, this should only be implemented -for providers that need no user interaction when deactivated. \ No newline at end of file +for providers that need no user interaction when deactivated.