protected function operation_query_delete(WdOperation $operation) { $entries = array(); foreach ($operation->params['entries'] as $id) { $record = $this->model[$id]; if (!$record) { continue; } $entries = array_merge(self::get_all_children_ids($record), $entries); } $entries = array_unique($entries); $operation->params['entries'] = $entries; return parent::operation_query_delete($operation); }
/** * Installs modules. * * @return \ICanBoogie\Errors */ protected function process_modules() { global $core; $modules = $core->modules; $modules->index; $ids = array(); $errors = new Errors(); $is_installed_errors = new Errors(); foreach ($modules->descriptors as $id => $descriptor) { $ids[] = $id; $modules->enable($id); } $core(); foreach ($modules->descriptors as $id => $descriptor) { $module = $modules[$id]; $is_installed_errors->clear(); if (!$module->is_installed($is_installed_errors)) { $module->install($errors); } } $core->vars['enabled_modules'] = $ids; \Icybee\Modules\Nodes\Module::create_default_routes(); return $errors; }
public static function on_modules_deactivate(Event $event) { \Icybee\Modules\Nodes\Module::create_default_routes(); }
/** * Overrides the "view", "list" and "home" views to provide different providers. */ protected function lazy_get_views() { $options = ['assets' => ['css' => [DIR . 'public/page.css']], 'provider' => __NAMESPACE__ . '\\ViewProvider']; return \ICanBoogie\array_merge_recursive(parent::lazy_get_views(), ['view' => $options, 'list' => $options, 'home' => $options]); }