◆ addPlugin()
  
  
      
        
          | ilComponentBuildPluginInfoObjective::addPlugin  | 
          ( | 
          array &  | 
          $data,  | 
         
        
           | 
           | 
          string  | 
          $type,  | 
         
        
           | 
           | 
          string  | 
          $component,  | 
         
        
           | 
           | 
          string  | 
          $slot,  | 
         
        
           | 
           | 
          string  | 
          $plugin  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 67 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().
   70         $plugin_php = $plugin_path . static::PLUGIN_PHP;
    72             throw new \RuntimeException(
    73                 "Cannot read $plugin_php."    77         $plugin_class = $plugin_path . sprintf(static::PLUGIN_CLASS_FILE, 
$plugin);
    79             throw new \RuntimeException(
    80                 "Cannot read $plugin_class."    84         require_once($plugin_php);
    86             throw new \InvalidArgumentException(
"$plugin does not define \$id");
    89             throw new \InvalidArgumentException(
"$plugin does not define \$version");
    92             throw new \InvalidArgumentException(
"$plugin does not define \$ilias_min_version");
    95             throw new \InvalidArgumentException(
"$plugin does not define \$ilias_max_version");
    99             throw new \RuntimeException(
   100                 "Plugin with id $id already exists."   116             $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 33 of file class.ilComponentBuildPluginInfoObjective.php.
References $components, $data, XapiProxy\$plugin, addPlugin(), isDir(), isDotFile(), and scanDir().
   36         foreach ([
'Modules', 
'Services'] as $type) {
    37             $base_path = static::BASE_PATH . $type . 
'/';
    38             if (! $this->
isDir($base_path)) {
    44                     || ! $this->
isDir($base_path . 
"$component")) {
    47                 $slots = $this->
scanDir($base_path . 
"$component");
    48                 foreach ($slots as $slot) {
    50                         || ! $this->
isDir($base_path . 
"$component/$slot")) {
    53                     $plugins = $this->
scanDir($base_path . 
"$component/$slot");
    56                             || ! $this->
isDir($base_path . 
"$component/$slot/$plugin")) {
    64         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   | 
  
 
 
◆ getArtifactName()
      
        
          | ilComponentBuildPluginInfoObjective::getArtifactName  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ isDir()
  
  
      
        
          | ilComponentBuildPluginInfoObjective::isDir  | 
          ( | 
          string  | 
          $dir | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ isDotFile()
  
  
      
        
          | ilComponentBuildPluginInfoObjective::isDotFile  | 
          ( | 
          string  | 
          $file | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ scanDir()
  
  
      
        
          | ilComponentBuildPluginInfoObjective::scanDir  | 
          ( | 
          string  | 
          $dir | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ BASE_PATH
  
  
      
        
          | const ilComponentBuildPluginInfoObjective::BASE_PATH = "./public/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: