Select Git revision
jsupdater.php
Forked from
Stud.IP / Stud.IP
Source project has a limited visibility.
-
David Siegfried authored
Closes #3950 Merge request studip/studip!2808
David Siegfried authoredCloses #3950 Merge request studip/studip!2808
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Plugin.php 1.03 KiB
<?php
namespace SchwarzesBrett;
use NotificationCenter;
use PageLayout;
use StudIPPlugin;
abstract class Plugin extends StudIPPlugin
{
use \TranslatablePluginTrait;
public function __construct()
{
parent::__construct();
foreach (get_class_methods($this) as $method) {
if (!preg_match('/^on\w+(Did|Will)\w+$/', $method)) {
continue;
}
$trigger = mb_substr($method, 2);
NotificationCenter::addObserver($this, $method, $trigger);
}
}
public static function getTranslationDomain()
{
return 'schwarzes-brett';
}
public function getTranslationPath()
{
return $this->getPluginPath() . '/locale';
}
/**
* Returns the plugin version from manifest.
*
* @return string version
*/
public function getPluginVersion()
{
static $manifest = null;
if ($manifest === null) {
$manifest = $this->getMetadata();
}
return $manifest['version'];
}
}