App settings ============ .. sectionauthor:: Bernhard Posselt You'll need to give some information on your app for instance the name. To do that open the :file:`appinfo/app.php` and adjust it like this .. code-block:: php 'yourappname', // sorting weight for the navigation. The higher the number, the higher // it will be listed in the navigation 'order' => 74, // the route that will be shown on startup // the routes have to be defined inside the appinfo/routes.php file 'href' => \OC_Helper::linkToRoute('yourappname_index'), // the icon that will be shown in the navigation // the icon must be stored inside the app's img/ folder 'icon' => \OCP\Util::imagePath('yourappname', 'example.png' ), // the title of your application. This will be used in the // navigation or on the settings page of your app 'name' => \OC_L10N::get('yourappname')->t('Your App') )); ?> .. _xml: The second place where app specifc information is stored is in :file:`appinfo/info.xml` .. code-block:: xml yourappname Your App Your App description 1.0 AGPL Your Name 5 ownCloud allows to specify four kind of "types" in the file:`appinfo/info.xml` of a app. The type doesn't have to be specified if the app doesn't match any of them. Currently supported "types": * **prelogin**: apps which needs to load on the login page * **filesystem**: apps which provides filesystem functionality (e.g. files sharing app) * **authentication**: apps which provided authentication backends * **logging**: apps which implement a logging system Dependency Injection -------------------- Dependency Injection helps you to create testable code. A good overview over how it works and what the benefits are can be seen on `Google's Clean Code Talks `_ The container is configured in :file:`dependencyinjection/dicontainer.php`. By default Pimple is used as dependency injection container. The documentation on how to use it can be read on the `Pimple Homepage `_ To add your own classes simply open the :file:`dependencyinjection/dicontainer.php` and add a line like this to the constructor: .. code-block:: php You can also overwrite already existing items from the App Framework simply by redefining them. **See also** :doc:`../general/dependencyinjection`