◆ addPlugin()
| ilComponentBuildPluginInfoObjective::addPlugin |
( |
array & |
$data, |
|
|
string |
$type, |
|
|
string |
$component, |
|
|
string |
$slot, |
|
|
string |
$plugin |
|
) |
| |
|
protected |
Definition at line 64 of file class.ilComponentBuildPluginInfoObjective.php.
References $id, $ilias_max_version, $ilias_min_version, $learning_progress, XapiProxy\$plugin, $responsible, $responsible_mail, $supports_export, $version, buildPluginPath(), and fileExists().
Referenced by build().
67 $plugin_php = $plugin_path . static::PLUGIN_PHP;
69 throw new \RuntimeException(
70 "Cannot read $plugin_php." 74 $plugin_class = $plugin_path . sprintf(static::PLUGIN_CLASS_FILE,
$plugin);
76 throw new \RuntimeException(
77 "Cannot read $plugin_class." 81 require_once($plugin_php);
83 throw new \InvalidArgumentException(
"$plugin does not define \$id");
86 throw new \InvalidArgumentException(
"$plugin does not define \$version");
89 throw new \InvalidArgumentException(
"$plugin does not define \$ilias_min_version");
92 throw new \InvalidArgumentException(
"$plugin does not define \$ilias_max_version");
96 throw new \RuntimeException(
97 "Plugin with id $id already exists." 113 $supports_cli_setup ?? null
buildPluginPath(string $type, string $component, string $slot, string $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ build()
| ilComponentBuildPluginInfoObjective::build |
( |
| ) |
|
Definition at line 34 of file class.ilComponentBuildPluginInfoObjective.php.
References $data, XapiProxy\$plugin, addPlugin(), isDir(), isDotFile(), and scanDir().
37 foreach ([
"Modules",
"Services"] as $type) {
38 $components = $this->
scanDir(static::BASE_PATH . $type);
39 foreach ($components as $component) {
41 || ! $this->
isDir(static::BASE_PATH .
"$type/$component")) {
44 $slots = $this->
scanDir(static::BASE_PATH .
"$type/$component");
45 foreach ($slots as $slot) {
47 || ! $this->
isDir(static::BASE_PATH .
"$type/$component/$slot")) {
50 $plugins = $this->
scanDir(static::BASE_PATH .
"$type/$component/$slot");
53 || ! $this->
isDir(static::BASE_PATH .
"$type/$component/$slot/$plugin")) {
61 return new Setup\Artifact\ArrayArtifact(
$data);
addPlugin(array &$data, string $type, string $component, string $slot, string $plugin)
◆ buildPluginPath()
| ilComponentBuildPluginInfoObjective::buildPluginPath |
( |
string |
$type, |
|
|
string |
$component, |
|
|
string |
$slot, |
|
|
string |
$plugin |
|
) |
| |
|
protected |
◆ fileExists()
| ilComponentBuildPluginInfoObjective::fileExists |
( |
string |
$path | ) |
|
|
protected |
◆ getArtifactPath()
| ilComponentBuildPluginInfoObjective::getArtifactPath |
( |
| ) |
|
◆ isDir()
| ilComponentBuildPluginInfoObjective::isDir |
( |
string |
$dir | ) |
|
|
protected |
◆ isDotFile()
| ilComponentBuildPluginInfoObjective::isDotFile |
( |
string |
$file | ) |
|
|
protected |
◆ scanDir()
| ilComponentBuildPluginInfoObjective::scanDir |
( |
string |
$dir | ) |
|
|
protected |
◆ BASE_PATH
| const ilComponentBuildPluginInfoObjective::BASE_PATH = "./Customizing/global/plugins/" |
|
protected |
◆ PLUGIN_CLASS_FILE
| const ilComponentBuildPluginInfoObjective::PLUGIN_CLASS_FILE = "classes/class.il%sPlugin.php" |
|
protected |
◆ PLUGIN_PHP
| const ilComponentBuildPluginInfoObjective::PLUGIN_PHP = "plugin.php" |
|
protected |
The documentation for this class was generated from the following file: