This commit is contained in:
Bernhard Posselt
2013-09-06 15:39:42 +02:00
parent 5e2d4a2717
commit 829effbb57
5 changed files with 14 additions and 17 deletions

View File

@@ -1 +0,0 @@
.. include:: ../app/externalapi.rst

View File

@@ -21,7 +21,6 @@ App Developement (App Framework)
../app/acceptancetesting
unittesting
middleware
externalapi
filesystem
hooks
data-migration

View File

@@ -38,28 +38,28 @@ The **app.php** will always loaded for every app and can for instance be used to
$api = new \OCA\AppFramework\Core\API('myapp');
$api->addNavigationEntry(array(
// the string under which your app will be referenced in owncloud
'id' => $api->getAppName(),
// sorting weight for the navigation. The higher the number, the higher
// will it be listed in the navigation
'order' => 10,
// the route that will be shown on startup
'href' => $api->linkToRoute('myapp_index'),
// the icon that will be shown in the navigation
// this file needs to exist in img/example.png
'icon' => $api->imagePath('example.png'),
'icon' => $api->imagePath('example.png'),
// the title of your application. This will be used in the
// navigation or on the settings page of your app
'name' => $api->getTrans()->t('My notes app')
'name' => $api->getTrans()->t('My notes app')
));
} else {
$msg = 'Can not enable the Notes app because the App Framework App is disabled';
$msg = 'Can not enable the MyApp app because the App Framework App is disabled';
\OCP\Util::writeLog('myapp', $msg, \OCP\Util::ERROR);
}
@@ -111,7 +111,7 @@ The :doc:`controllers` to which the route links does not exist yet and it has to
class PageController extends Controller {
public function __construct($api, $request){
parent::__construct($api, $request);
@@ -149,7 +149,7 @@ Now create the :doc:`templates` which contains the HTML
Wire everything together
------------------------
The last thing that is left is to tell the application how the controller needs to be created. The App Framework makes heavy use of :doc:`../general/dependencyinjection` and provides an :doc:`IOC Container <container>`. Inside this container, the controller needs to be created:
The last thing that is left is to tell the application how the controller needs to be created. The App Framework makes heavy use of :doc:`../general/dependencyinjection` and provides an :doc:`IoC Container <container>`. Inside this container, the controller needs to be created:
:file:`dependencyinjection/dicontainer.php`

View File

@@ -127,7 +127,6 @@ Additional APIs
Can be used with and without App Framework
* :doc:`appframework/data-migration`
* :doc:`appframework/externalapi`
* :doc:`appframework/hooks`
* :doc:`appframework/filesystem`

View File

@@ -13,8 +13,8 @@ Depending on the used distribution change into that directory inside a terminal:
cd /var/www/
Using the scaffolding tool
--------------------------
Create the app automatically
----------------------------
The scaffolding script provides an easy way to generate boilerplate code for an app. To install the tool, install **Python 3** and **python-pip**, then run::
sudo pip install owncloud_scaffolding
@@ -29,8 +29,8 @@ To create a standard ownCloud app run::
This will create all the needed files in the current directory. For more information on how to customize the generated app, see the `GitHub page <https://github.com/Raydiation/owncloud_scaffolding>`_
Manual file creation
--------------------
Create the app manually
-----------------------
If you dont want to use the scaffolding tool, heres how you create all the needed files: create a directory for the app and make it writable::
mkdir apps/YOUR_APP