plugins/ExamPlugin/ExamPlugin.php line 10

Open in your IDE?
  1. <?php
  2. namespace ExamPlugin;
  3. use Codeages\PluginBundle\System\PluginBase;
  4. use ExamPlugin\Biz\ExamServiceProvider;
  5. use ExamPlugin\DependencyInjection\Compiler\ExtensionPass;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. class ExamPlugin extends PluginBase
  8. {
  9.     public function build(ContainerBuilder $container)
  10.     {
  11.         $container->addCompilerPass(new ExtensionPass());
  12.     }
  13.     public function boot()
  14.     {
  15.         parent::boot();
  16.         $this->registerBiz();
  17.     }
  18.     public function getEnabledExtensions()
  19.     {
  20.         return ['DataTag''StatusTemplate''DataDict''NotificationTemplate'];
  21.     }
  22.     protected function registerBiz()
  23.     {
  24.         $biz $this->container->get('biz');
  25.         $biz->register(new ExamServiceProvider());
  26.     }
  27. }