~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to custom/README.md

  • Committer: Dan Garner
  • Date: 2015-03-26 14:08:33 UTC
  • Revision ID: git-v1:70d14044444f8dc5d602b99890d59dea46d9470c
Moved web servable files to web folder

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Custom Modules
2
 
This folder is provided as a reasonable place to copy/develop custom modules. This folder is auto-loaded based on the 
3
 
`Xibo\Custom` namespace.
4
 
 
5
 
This folder is also monitored by the Modules Page for `.json` files describing modules available to be installed, the 
6
 
structure of such a file is:
7
 
 
8
 
``` json
9
 
{
10
 
  "title": "Module Title",
11
 
  "author": "Module Author",
12
 
  "description": "Module Description",
13
 
  "name": "code-name",
14
 
  "class": "Xibo\\Custom\\ClassName"
15
 
}
16
 
```
17
 
 
18
 
The module class must `extend Xibo\Widget\ModuleWidget` and implement the installOrUpdate method.
19
 
 
20
 
We recommend that modules put their Twig Views in a sub-folder of this one, named as their module name. This should be
21
 
set in `installOrUpdate` like `$module->viewPath = '../custom/{name}';`.
22
 
 
23
 
 
24
 
## Web Accessible Resources
25
 
All web accessible resources must placed in the `/web/modules` folder and be installed to the library in `installFiles`.
26
 
 
27
 
 
28
 
# Theme Views
29
 
This location can also be used for theme views - we recommend a sub-folder for each theme. The theme `config.php` file
30
 
should set its `view_path` to `PROJECT_ROOT . '/custom/folder-name`.
 
 
b'\\ No newline at end of file'