コード例 #1
0
 /**
  * Handle the command.
  *
  * @param AddonTableBuilder $builder
  * @param AddonCollection   $addons
  */
 public function handle(AddonTableBuilder $builder, AddonCollection $addons)
 {
     /* @var AddonCollection|ModuleCollection|ExtensionCollection $entries */
     $entries = $addons->{$builder->getType()}->withAnyConfig(['settings', 'settings/settings']);
     if (in_array($builder->getType(), ['modules', 'extensions'])) {
         $entries = $entries->enabled();
     }
     $builder->setTableEntries($entries);
 }
コード例 #2
0
 /**
  * Return an index of addons with settings.
  *
  * @param AddonTableBuilder $table
  * @param                   $type
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(AddonTableBuilder $table, $type)
 {
     $table->setType($type);
     return $table->render();
 }
コード例 #3
0
 /**
  * Handle the command.
  *
  * @param AddonTableBuilder $builder
  * @param AddonCollection   $addons
  */
 public function handle(AddonTableBuilder $builder, AddonCollection $addons)
 {
     $builder->setTableEntries($addons->{$builder->getType()}->withAnyConfig(['settings', 'settings/settings']));
 }