@@ -34,55 +34,55 @@ |
||
34 | 34 | use OCP\SystemTag\MapperEvent; |
35 | 35 | |
36 | 36 | class Application extends App implements IBootstrap { |
37 | - public const APP_ID = 'systemtags'; |
|
37 | + public const APP_ID = 'systemtags'; |
|
38 | 38 | |
39 | - public function __construct() { |
|
40 | - parent::__construct(self::APP_ID); |
|
41 | - } |
|
39 | + public function __construct() { |
|
40 | + parent::__construct(self::APP_ID); |
|
41 | + } |
|
42 | 42 | |
43 | - public function register(IRegistrationContext $context): void { |
|
44 | - } |
|
43 | + public function register(IRegistrationContext $context): void { |
|
44 | + } |
|
45 | 45 | |
46 | - public function boot(IBootContext $context): void { |
|
47 | - /* |
|
46 | + public function boot(IBootContext $context): void { |
|
47 | + /* |
|
48 | 48 | * @todo move the OCP events and then move the registration to `register` |
49 | 49 | */ |
50 | - $eventDispatcher = $context->getServerContainer()->getEventDispatcher(); |
|
51 | - $eventDispatcher->addListener( |
|
52 | - 'OCA\Files::loadAdditionalScripts', |
|
53 | - function () { |
|
54 | - // FIXME: no public API for these ? |
|
55 | - \OCP\Util::addScript('dist/systemtags'); |
|
56 | - \OCP\Util::addScript(self::APP_ID, 'systemtags'); |
|
57 | - } |
|
58 | - ); |
|
50 | + $eventDispatcher = $context->getServerContainer()->getEventDispatcher(); |
|
51 | + $eventDispatcher->addListener( |
|
52 | + 'OCA\Files::loadAdditionalScripts', |
|
53 | + function () { |
|
54 | + // FIXME: no public API for these ? |
|
55 | + \OCP\Util::addScript('dist/systemtags'); |
|
56 | + \OCP\Util::addScript(self::APP_ID, 'systemtags'); |
|
57 | + } |
|
58 | + ); |
|
59 | 59 | |
60 | - $managerListener = function (ManagerEvent $event) use ($context) { |
|
61 | - /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
62 | - $listener = $context->getServerContainer()->query(Listener::class); |
|
63 | - $listener->event($event); |
|
64 | - }; |
|
65 | - $eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener); |
|
66 | - $eventDispatcher->addListener(ManagerEvent::EVENT_DELETE, $managerListener); |
|
67 | - $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); |
|
60 | + $managerListener = function (ManagerEvent $event) use ($context) { |
|
61 | + /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
62 | + $listener = $context->getServerContainer()->query(Listener::class); |
|
63 | + $listener->event($event); |
|
64 | + }; |
|
65 | + $eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener); |
|
66 | + $eventDispatcher->addListener(ManagerEvent::EVENT_DELETE, $managerListener); |
|
67 | + $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); |
|
68 | 68 | |
69 | - $mapperListener = function (MapperEvent $event) use ($context) { |
|
70 | - /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
71 | - $listener = $context->getServerContainer()->query(Listener::class); |
|
72 | - $listener->mapperEvent($event); |
|
73 | - }; |
|
74 | - $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
|
75 | - $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
|
69 | + $mapperListener = function (MapperEvent $event) use ($context) { |
|
70 | + /** @var \OCA\SystemTags\Activity\Listener $listener */ |
|
71 | + $listener = $context->getServerContainer()->query(Listener::class); |
|
72 | + $listener->mapperEvent($event); |
|
73 | + }; |
|
74 | + $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
|
75 | + $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
|
76 | 76 | |
77 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
78 | - $l = \OC::$server->getL10N(self::APP_ID); |
|
79 | - return [ |
|
80 | - 'id' => 'systemtagsfilter', |
|
81 | - 'appname' => self::APP_ID, |
|
82 | - 'script' => 'list.php', |
|
83 | - 'order' => 25, |
|
84 | - 'name' => $l->t('Tags'), |
|
85 | - ]; |
|
86 | - }); |
|
87 | - } |
|
77 | + \OCA\Files\App::getNavigationManager()->add(function () { |
|
78 | + $l = \OC::$server->getL10N(self::APP_ID); |
|
79 | + return [ |
|
80 | + 'id' => 'systemtagsfilter', |
|
81 | + 'appname' => self::APP_ID, |
|
82 | + 'script' => 'list.php', |
|
83 | + 'order' => 25, |
|
84 | + 'name' => $l->t('Tags'), |
|
85 | + ]; |
|
86 | + }); |
|
87 | + } |
|
88 | 88 | } |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | $eventDispatcher = $context->getServerContainer()->getEventDispatcher(); |
51 | 51 | $eventDispatcher->addListener( |
52 | 52 | 'OCA\Files::loadAdditionalScripts', |
53 | - function () { |
|
53 | + function() { |
|
54 | 54 | // FIXME: no public API for these ? |
55 | 55 | \OCP\Util::addScript('dist/systemtags'); |
56 | 56 | \OCP\Util::addScript(self::APP_ID, 'systemtags'); |
57 | 57 | } |
58 | 58 | ); |
59 | 59 | |
60 | - $managerListener = function (ManagerEvent $event) use ($context) { |
|
60 | + $managerListener = function(ManagerEvent $event) use ($context) { |
|
61 | 61 | /** @var \OCA\SystemTags\Activity\Listener $listener */ |
62 | 62 | $listener = $context->getServerContainer()->query(Listener::class); |
63 | 63 | $listener->event($event); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $eventDispatcher->addListener(ManagerEvent::EVENT_DELETE, $managerListener); |
67 | 67 | $eventDispatcher->addListener(ManagerEvent::EVENT_UPDATE, $managerListener); |
68 | 68 | |
69 | - $mapperListener = function (MapperEvent $event) use ($context) { |
|
69 | + $mapperListener = function(MapperEvent $event) use ($context) { |
|
70 | 70 | /** @var \OCA\SystemTags\Activity\Listener $listener */ |
71 | 71 | $listener = $context->getServerContainer()->query(Listener::class); |
72 | 72 | $listener->mapperEvent($event); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $eventDispatcher->addListener(MapperEvent::EVENT_ASSIGN, $mapperListener); |
75 | 75 | $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); |
76 | 76 | |
77 | - \OCA\Files\App::getNavigationManager()->add(function () { |
|
77 | + \OCA\Files\App::getNavigationManager()->add(function() { |
|
78 | 78 | $l = \OC::$server->getL10N(self::APP_ID); |
79 | 79 | return [ |
80 | 80 | 'id' => 'systemtagsfilter', |
@@ -6,32 +6,32 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitSystemTags |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\SystemTags\\' => 15, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\SystemTags\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\SystemTags\\Activity\\Listener' => __DIR__ . '/..' . '/../lib/Activity/Listener.php', |
|
25 | - 'OCA\\SystemTags\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
26 | - 'OCA\\SystemTags\\Activity\\Setting' => __DIR__ . '/..' . '/../lib/Activity/Setting.php', |
|
27 | - 'OCA\\SystemTags\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
28 | - 'OCA\\SystemTags\\Controller\\LastUsedController' => __DIR__ . '/..' . '/../lib/Controller/LastUsedController.php', |
|
29 | - 'OCA\\SystemTags\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\SystemTags\\Activity\\Listener' => __DIR__.'/..'.'/../lib/Activity/Listener.php', |
|
25 | + 'OCA\\SystemTags\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
26 | + 'OCA\\SystemTags\\Activity\\Setting' => __DIR__.'/..'.'/../lib/Activity/Setting.php', |
|
27 | + 'OCA\\SystemTags\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
28 | + 'OCA\\SystemTags\\Controller\\LastUsedController' => __DIR__.'/..'.'/../lib/Controller/LastUsedController.php', |
|
29 | + 'OCA\\SystemTags\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
30 | 30 | ); |
31 | 31 | |
32 | 32 | public static function getInitializer(ClassLoader $loader) |
33 | 33 | { |
34 | - return \Closure::bind(function () use ($loader) { |
|
34 | + return \Closure::bind(function() use ($loader) { |
|
35 | 35 | $loader->prefixLengthsPsr4 = ComposerStaticInitSystemTags::$prefixLengthsPsr4; |
36 | 36 | $loader->prefixDirsPsr4 = ComposerStaticInitSystemTags::$prefixDirsPsr4; |
37 | 37 | $loader->classMap = ComposerStaticInitSystemTags::$classMap; |
@@ -6,10 +6,10 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\SystemTags\\Activity\\Listener' => $baseDir . '/../lib/Activity/Listener.php', |
|
10 | - 'OCA\\SystemTags\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
11 | - 'OCA\\SystemTags\\Activity\\Setting' => $baseDir . '/../lib/Activity/Setting.php', |
|
12 | - 'OCA\\SystemTags\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
13 | - 'OCA\\SystemTags\\Controller\\LastUsedController' => $baseDir . '/../lib/Controller/LastUsedController.php', |
|
14 | - 'OCA\\SystemTags\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
9 | + 'OCA\\SystemTags\\Activity\\Listener' => $baseDir.'/../lib/Activity/Listener.php', |
|
10 | + 'OCA\\SystemTags\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
11 | + 'OCA\\SystemTags\\Activity\\Setting' => $baseDir.'/../lib/Activity/Setting.php', |
|
12 | + 'OCA\\SystemTags\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
13 | + 'OCA\\SystemTags\\Controller\\LastUsedController' => $baseDir.'/../lib/Controller/LastUsedController.php', |
|
14 | + 'OCA\\SystemTags\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
15 | 15 | ); |