mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Dev Documentation enhancements
This commit is contained in:
parent
0e6e3c0891
commit
2063b0394e
@ -1,7 +1,6 @@
|
||||
Automatic Updating
|
||||
==================
|
||||
|
||||
|
||||
> Warning: Please check before you run an update, that your installed modules and themes are compatible with the new version. If not, you can follow the migration guides.
|
||||
- [Theme Migration Guide](theming-migrate.md)
|
||||
- [Module Migration Guide](dev-migrate.md)
|
||||
|
@ -3,32 +3,33 @@ Developement Guide
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
* [Overview](dev-index.md)
|
||||
* [Development Environment](dev-index.md)
|
||||
* [Overview](overview.md)
|
||||
* [Git/Composer Installation](git-installation.md)
|
||||
* [Development Environment](environment.md)
|
||||
|
||||
Core Components
|
||||
---------------
|
||||
* [Content](dev-content.md)
|
||||
* [Notifications](dev-notifications.md)
|
||||
* [Models / Database](dev-db.md)
|
||||
* [Activities](dev-activities.md)
|
||||
* [Events](dev-events.md)
|
||||
* [Settings and Configuration](dev-settings.md)
|
||||
|
||||
Module Development
|
||||
------------------
|
||||
* [Introduction](dev-module.md)
|
||||
* [Basic Structure](dev-module.md)
|
||||
* [Update / Migration](dev-migrate.md)
|
||||
* [Introduction](modules-index.md)
|
||||
* [Basic Structure](modules-structure.md)
|
||||
* [Migration/Updates](modules-migrate.md)
|
||||
* [Content](content.md)
|
||||
* [Events](modules-events.md)
|
||||
* [Settings and Configuration](modules-settings.md)
|
||||
* [Models / Database](modules-db.md)
|
||||
* [Internationalization](modules-i18n.md)
|
||||
|
||||
Module Tutorial
|
||||
---------------
|
||||
* [Create basic structure](tutorial-basic-structure.md)
|
||||
|
||||
Special Topics
|
||||
--------------
|
||||
* [Internationalization](dev-i18n.md)
|
||||
* [Authentication](dev-authentication.md)
|
||||
* [Search](dev-search.md)
|
||||
* [CronJobs](dev-cron.md)
|
||||
* [Console Application](dev-console.md)
|
||||
* [Streams](dev-stream.md)
|
||||
* [Permissions](dev-permissions.md)
|
||||
* [Widgets](dev-widgets.md)
|
||||
* [Notifications](notifications.md)
|
||||
* [Activities](activities.md)
|
||||
* [Authentication](authentication.md)
|
||||
* [Search](search.md)
|
||||
* [Console Application](console.md)
|
||||
* [Streams](stream.md)
|
||||
* [Permissions](permissions.md)
|
||||
* [Widgets](widgets.md)
|
||||
|
@ -1,4 +0,0 @@
|
||||
CronJobs
|
||||
========
|
||||
|
||||
TBD
|
83
protected/humhub/docs/guide/developer/environment.md
Normal file
83
protected/humhub/docs/guide/developer/environment.md
Normal file
@ -0,0 +1,83 @@
|
||||
Development Environment
|
||||
=======================
|
||||
|
||||
|
||||
Quick Notes
|
||||
-----------
|
||||
|
||||
- Make sure that your using a Git/Composer HumHub Installation
|
||||
- Enable development mode, see [Disable Errors Section](../admin/security.md#disable-errors-debugging)
|
||||
- Disable Caching under `Administration -> Settings -> Advanced -> Caching -> None`
|
||||
|
||||
|
||||
Modules Directory
|
||||
-----------------
|
||||
|
||||
You can also locate your custom modules outside of the HumHub project structure.
|
||||
|
||||
```php
|
||||
return [
|
||||
//...
|
||||
'params' => [
|
||||
'moduleAutoloadPaths' => ['/some/folder/modules'],
|
||||
],
|
||||
//...
|
||||
```
|
||||
|
||||
|
||||
|
||||
Yii Debug Module
|
||||
----------------
|
||||
|
||||
Add following block to your local web configuration (/protected/config/web.php)
|
||||
|
||||
```php
|
||||
<?php
|
||||
return [
|
||||
// ...
|
||||
'bootstrap' => ['debug'],
|
||||
'modules' => [
|
||||
// ...
|
||||
'debug' => [
|
||||
'class' => 'yii\debug\Module',
|
||||
'allowedIPs' => ['127.0.0.1', '::1'],
|
||||
],
|
||||
// ...
|
||||
]
|
||||
];
|
||||
?>
|
||||
```
|
||||
|
||||
Gii Code Generator
|
||||
-------------------
|
||||
|
||||
Add following block to your local web configuration (/protected/config/web.php)
|
||||
|
||||
```php
|
||||
return [
|
||||
// ...
|
||||
'modules' => [
|
||||
// ...
|
||||
'gii' => [
|
||||
'class' => 'yii\gii\Module',
|
||||
'allowedIPs' => ['127.0.0.1', '::1'],
|
||||
],
|
||||
// ...
|
||||
]
|
||||
];
|
||||
?>
|
||||
```
|
||||
|
||||
Add following block to your local console configuration (/protected/config/console.php)
|
||||
|
||||
```php
|
||||
return [
|
||||
// ...
|
||||
'bootstrap' => ['gii'],
|
||||
'modules' => [
|
||||
'gii' => 'yii\gii\Module',
|
||||
],
|
||||
// ...
|
||||
];
|
||||
```
|
||||
|
12
protected/humhub/docs/guide/developer/modules-index.md
Normal file
12
protected/humhub/docs/guide/developer/modules-index.md
Normal file
@ -0,0 +1,12 @@
|
||||
Modules - Getting Started
|
||||
=================
|
||||
|
||||
Basically modules in HumHub are identical to Yii2 modules [http://www.yiiframework.com/doc-2.0/guide-structure-modules.html](http://www.yiiframework.com/doc-2.0/guide-structure-modules.html).
|
||||
|
||||
The HumHub platform provides following module enhancements
|
||||
- Module Metadata (Title, Description and Image)
|
||||
- Dynamic module management (enable / disable / install / uninstall) via administration interface
|
||||
- Usable as Space or User Profile module
|
||||
- Events API
|
||||
- Automatic Module Updates (Marketplace)
|
||||
|
@ -13,7 +13,7 @@ The stream handling is now handled directly by the Content model. Also all strea
|
||||
|
||||
### File module changes
|
||||
|
||||
Please refer the new [File Handling](dev-files.md) documentation section for more details regarding the new file management API.
|
||||
Please refer the new [File Handling](files.md) documentation section for more details regarding the new file management API.
|
||||
|
||||
- Deprecated widgets:
|
||||
- humhub\modules\user\widgets\UserPicker (replaced with humhub\modules\user\widgets\UserPickerField)
|
||||
@ -70,7 +70,7 @@ TBD
|
||||
- Renamed space header settings menu dropdown class
|
||||
from [[humhub\modules\space\modules\manage\widgets\Menu]] to [[humhub\modules\space\widgets\HeaderControlsMenu]]
|
||||
|
||||
- Refactored settings system. see [Settings Documentation](dev-settings.md) for more details.
|
||||
- Refactored settings system. see [Settings Documentation](modules-settings.md) for more details.
|
||||
Old settings api is still available in 1.1.x
|
||||
|
||||
- Refactored user group system
|
||||
@ -85,7 +85,7 @@ TBD
|
||||
**Important: This release upgrades from Yii1 to Yii2 Framework!**
|
||||
|
||||
This requires an extensive migration of all custom modules/themes.
|
||||
Find more details here: [HumHub 0.20 Migration](dev-migrate-0.20.md)
|
||||
Find more details here: [HumHub 0.20 Migration](modules-migrate-0.20.md)
|
||||
|
||||
## Migrate from 0.11 to 0.12
|
||||
|
@ -1,18 +1,23 @@
|
||||
Modules - Getting Started
|
||||
=================
|
||||
Basic Module Structure
|
||||
======================
|
||||
|
||||
Basically modules in HumHub are identical to Yii2 modules [http://www.yiiframework.com/doc-2.0/guide-structure-modules.html](http://www.yiiframework.com/doc-2.0/guide-structure-modules.html).
|
||||
## Module folder structure
|
||||
|
||||
You can use either the Yii's module base class [[yii\base\Module]] or the enhanced HumHub module base class [[humhub\components\Module]].
|
||||
* **controllers/**
|
||||
* **models/**
|
||||
* **views/**
|
||||
* **Module.php** (more information below)
|
||||
* **config.php** (more information below)
|
||||
* **module.json** (more information below)
|
||||
|
||||
The enhanced HumHub module class provides additional features like:
|
||||
- Dynamic module management (enable / disable / install / uninstall) via administration interface
|
||||
- Usable as Space or User Profile module
|
||||
|
||||
## Base Module Class
|
||||
|
||||
TBD
|
||||
|
||||
|
||||
## config.php
|
||||
|
||||
|
||||
If the module is placed inside the */protected/modules* folder, you can create a *config.php* in the module directory which provides automatic loading without manually modifing the application config.
|
||||
|
||||
The config.php should return an array including following fields:
|
||||
@ -61,4 +66,5 @@ This file holds basic information about the module like name, description or cur
|
||||
"minVersion": "0.20"
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
@ -0,0 +1,4 @@
|
||||
Module Development Tutorial
|
||||
===========================
|
||||
|
||||
TBD
|
@ -1,12 +1,18 @@
|
||||
Overview
|
||||
========
|
||||
|
||||
## Getting Started
|
||||
HumHub is a very powerful platform, and part of its power lies in the fact that it is very easy to build upon and expand through modules and overriding code.
|
||||
HumHub is written mostly in PHP based on the Yii Framework.
|
||||
|
||||
- HumHub is based on Yii 2.0 PHP Framework (http://www.yiiframework.com/)
|
||||
- [The Definitive Guide to Yii 2.0](http://www.yiiframework.com/doc-2.0/guide-index.html)
|
||||
Other languages used throughout are JavaScript, HTML, SQL and CSS.
|
||||
It uses a Model-View-Controller (MVC)-like pattern for its software architecture. Additionally, it uses technologies such as Yii2, jQuery, Bootstrap, Less, etc.
|
||||
In this guide, you will find all the necessary information to customize HumHub.
|
||||
|
||||
## Application Overview
|
||||
As HumHub is based on Yii 2.0 PHP Framework (http://www.yiiframework.com/) make sure you're also familiar with this framework.
|
||||
[The Definitive Guide to Yii 2.0](http://www.yiiframework.com/doc-2.0/guide-index.html)
|
||||
|
||||
Application Overview
|
||||
--------------------
|
||||
|
||||
Humhub is based on _PHP5_ and _Yii2_ and leverages the highly modular and flexible nature of _Yii_.
|
||||
Before learning about the internals of HumHub, you should be familiar with the basic concepts of
|
||||
@ -46,72 +52,3 @@ The HumHub core contains several core modules as well as extended Yii components
|
||||
- **space:** Space related functionality
|
||||
- **tour:** HumHub user-guide
|
||||
- **user:** Basic user module
|
||||
|
||||
## Development Environment Notes
|
||||
|
||||
- Use Composer Installation as described in the [Installation Guide](admin-installation.md#via-gitcomposer)
|
||||
- Switch to development mode in ``index.php`` (described [here](admin-installation.md#disable-errors-debugging))
|
||||
- Disable Caching under **Administration -> Settings -> Caching -> None**
|
||||
|
||||
## Enable Yii Debug Module
|
||||
|
||||
Add following block to your local web configuration (/protected/config/web.php)
|
||||
|
||||
```php
|
||||
<?php
|
||||
return [
|
||||
// ...
|
||||
'bootstrap' => ['debug'],
|
||||
'modules' => [
|
||||
// ...
|
||||
|
||||
'debug' => [
|
||||
'class' => 'yii\debug\Module',
|
||||
'allowedIPs' => ['127.0.0.1', '::1'],
|
||||
],
|
||||
|
||||
// ...
|
||||
]
|
||||
];
|
||||
?>
|
||||
```
|
||||
|
||||
## Enable Gii
|
||||
|
||||
### Web
|
||||
|
||||
Add following block to your local web configuration (/protected/config/web.php)
|
||||
|
||||
```php
|
||||
return [
|
||||
// ...
|
||||
'modules' => [
|
||||
// ...
|
||||
|
||||
'gii' => [
|
||||
'class' => 'yii\gii\Module',
|
||||
'allowedIPs' => ['127.0.0.1', '::1'],
|
||||
],
|
||||
|
||||
// ...
|
||||
]
|
||||
];
|
||||
?>
|
||||
```
|
||||
|
||||
|
||||
### Console
|
||||
|
||||
Add following block to your local console configuration (/protected/config/console.php)
|
||||
|
||||
```php
|
||||
return [
|
||||
// ...
|
||||
'bootstrap' => ['gii'],
|
||||
'modules' => [
|
||||
'gii' => 'yii\gii\Module',
|
||||
],
|
||||
// ...
|
||||
];
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user