/** * 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); }
/** * 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(); }
/** * 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'])); }