Skip to content
Snippets Groups Projects
Select Git revision
  • 8474ee1063d11f1d5fd4b79674d2d734b82e18b0
  • main default protected
  • 5.5 protected
  • atlantis
  • 5.3 protected
  • 5.0 protected
  • issue-23
  • issue8-seat-logging-and-export
  • ticket-216
  • tickets-215-216-241-242
10 results

SimpleCollection.class.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Plugin.php 728 B
    <?php
    namespace TracToGitlab;
    
    use DI;
    use Studip\DIContainer;
    use StudIPPlugin;
    
    abstract class Plugin extends StudIPPlugin
    {
        protected function setupDiContainer()
        {
            $container = DIContainer::getInstance();
    
            $definitions = require __DIR__ . '/../bootstrap-definitions.php';
    
            foreach ($definitions as $name => $value) {
                if ($value instanceof \Closure) {
                    $value = $value($container);
                }
                $container->set($name, $value);
            }
        }
    
        public function perform($unconsumed_path)
        {
            require_once $this->getPluginPath() . '/vendor/autoload.php';
    
            $this->setupDiContainer();
    
            parent::perform($unconsumed_path);
        }
    }