/** * Handle the command. * * @param AddonTableBuilder $builder */ public function handle(AddonTableBuilder $builder) { $builder->setButtons(['information' => ['data-toggle' => 'modal', 'data-target' => '#modal', 'href' => 'admin/addons/details/{entry.namespace}'], 'install' => ['data-toggle' => 'modal', 'data-target' => '#modal', 'href' => 'admin/addons/options/{entry.namespace}', 'enabled' => function (Addon $entry) { if (!$entry instanceof Module && !$entry instanceof Extension) { return false; } return !$entry->isInstalled(); }], 'uninstall' => ['href' => 'admin/addons/uninstall/{entry.namespace}', 'enabled' => function (Addon $entry) { if (!$entry instanceof Module && !$entry instanceof Extension) { return false; } return $entry->isInstalled(); }]]); }
/** * Handle the command. * * @param AddonTableBuilder $builder */ public function handle(AddonTableBuilder $builder) { $builder->setButtons(['install' => ['href' => 'admin/addons/install/{entry.namespace}', 'enabled' => function (Addon $entry) { if (!$entry instanceof Module && !$entry instanceof Extension) { return false; } return !$entry->isInstalled(); }], 'uninstall' => ['href' => 'admin/addons/uninstall/{entry.namespace}', 'enabled' => function (Addon $entry) { if (!$entry instanceof Module && !$entry instanceof Extension) { return false; } return $entry->isInstalled(); }]]); }
/** * Handle the command. * * @param AddonTableBuilder $builder */ public function handle(AddonTableBuilder $builder) { $builder->setColumns([['heading' => 'module::field.name.name', 'wrapper' => '<a href="/admin/addons/details/{value.addon}" data-toggle="modal" data-target="#modal">{value.title}</a>', 'value' => ['title' => 'entry.title', 'addon' => 'entry.namespace']], ['heading' => 'module::field.description.name', 'value' => 'entry.description']]); }
/** * Handle the command. * * @param AddonTableBuilder $builder * @param AddonCollection $addons */ public function handle(AddonTableBuilder $builder, AddonCollection $addons) { $addons = $addons->{$builder->getType()}(); $builder->setTableEntries($addons); }
/** * Handle the command. * * @param AddonTableBuilder $builder */ public function handle(AddonTableBuilder $builder) { $builder->setColumns([['heading' => 'module::field.name.name', 'value' => 'entry.title'], ['heading' => 'module::field.description.name', 'value' => 'entry.description']]); }
/** * Return an index of existing entries. * * @param AddonTableBuilder $builder * @param string $type * @return \Symfony\Component\HttpFoundation\Response */ public function index(AddonTableBuilder $builder, $type = 'modules') { $builder->setType($type); return $builder->render(); }