[MODULES] Rename extensions to modules, add example plugin, change plugin location

This commit is contained in:
Hugo Sales
2020-03-28 14:39:48 +00:00
committed by Hugo Sales
parent 6c8da48efa
commit 1caab62200
8 changed files with 47 additions and 21 deletions

View File

@@ -0,0 +1,14 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
class TestController extends AbstractController
{
public function __invoke()
{
return new Response('<div style="background: #333; text: #999"> Test controller </div>');
}
}

11
plugins/Test/Test.php Normal file
View File

@@ -0,0 +1,11 @@
<?php
namespace Plugin\Test;
class Test
{
public function onTest(string $foo)
{
dump('Event handled: ' . $foo);
}
}

View File

@@ -0,0 +1,15 @@
info:
name: 'Example'
version: '0.1'
author: 'Hugo Sales'
homepage: '{project_url}'
description: |
Test plugin
Description can use multiple lines
permissions:
database:
- 'table1': 'r'
- 'table2': 'rw'
filesystem:
- 'folder': 'rw'