public static function allKey() { $list = Module::all(); $modulesKey = array(); foreach ($list as $item) { $modulesKey[$item->extension] = $item; } return $modulesKey; }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $feature = Feature::find($id); $features = Feature::all(); $modules = Module::all(); if (is_null($feature)) { return redirect()->route('features.listfeature'); } return View('features.editfeature', compact('feature', 'features', 'modules')); }
/** * Display a listing of the resource. * GET /modules * * @return Response */ public function index() { // return Excel::create('Mastersheet BQu version', function ($excel) { $excel->sheet('Marks-Input Sheet', function ($sheet) { $sheet->loadView('export.input_sheet')->with('student_module_marks_input', StudentModuleMarksInput::all()->reverse())->with('module_element', ModuleElement::all())->with('modules', Module::all())->with('courses', ApplicationCourse::all())->with('users', User::all()); }); $excel->setcreator('BQu'); $excel->setlastModifiedBy('BQu'); $excel->setcompany('BQuServices(PVT)LTD'); $excel->setmanager('Rajitha'); })->download('xls'); }
public function getIndex() { User::onlyHas("modules-view"); $this->data['modules'] = Module::all(); $this->layout->content = View::make('sections.module.list')->with($this->data); }
function getSub($id = '') { $row = DB::table('tb_module')->where('module_name', $id)->get(); if (count($row) <= 0) { return Redirect::to($this->module)->with('messagetext', 'Can not find module')->with('msgstatus', 'error'); } $row = $row[0]; $config = SiteHelpers::CF_decode_json($row->module_config); $this->data['row'] = $row; $this->data['fields'] = $config['grid']; $this->data['subs'] = isset($config['subgrid']) ? $config['subgrid'] : array(); $this->data['tables'] = Module::getTableList($this->db); $this->data['module'] = $this->module; $this->data['module_name'] = $id; $this->data['modules'] = Module::all(); $this->layout->nest('content', 'admin.module.ConfigSub', $this->data)->with('menus', SiteHelpers::menus()); }
<?php /** * @package Hello_Dolly * @version 1.6 */ /* Plugin Name: INIT Plugin URI: Description: System Init Author: Mo Version: 1.1 Author URI: http://mo.sh/ */ register_theme_directory(__DIR__); foreach (Module::all() as $name => $module) { if (Module::find($name)->json()->type == 'theme') { register_theme_directory(dirname($module->getpath())); //kd($module->getpath()); } } //add_filter('theme_root',function($theme_root){ // return __DIR__; //}); //add_filter('theme_root_uri',function($theme_root_uri = '', $siteurl = '', $stylesheet_or_template = ''){ // kd($theme_root_uri, $siteurl, $stylesheet_or_template); // return content_url(); //}); show_admin_bar(false); // 上传图片时把绝对地址修改成相对地址(禁用,导致上传文件http错误) //add_filter('wp_handle_upload', function ($fileInfos){
/** * The list that is displayed while selecting item for menu * @return array */ public static function menu_lists() { $modules = array(); foreach (Module::all(array('name', 'links')) as $module) { if ($module->links != '') { $links = json_decode($module->links); foreach ($links as $link) { $modules['link_type/modules/' . $link->alias] = $link->name; } } else { $modules['link_type/modules/' . Str::slug($module->name, '_')] = $module->name; } } $pages = array(); foreach (Post::type('page')->get(array('title', 'permalink')) as $page) { $pages['pages/' . $page->permalink] = $page->title; } $post_categories = array(); foreach (Category::type('post')->get(array('name', 'alias')) as $page_category) { $post_categories['posts/category/' . $page_category->alias] = $page_category->name; } $contacts = array(); foreach (Components\ContactManager\Models\ContactDetail::get(array('name', 'alias')) as $contact) { $contacts['contact/show/' . $contact->alias] = $contact->name; } $contact_categories = array(); foreach (Components\ContactManager\Models\ContactCategory::get(array('name', 'alias')) as $contact_cat) { $contact_categories['contact/' . $contact_cat->alias] = $contact_cat->name; } $forms = array(); foreach (BuiltForm::get(array('name', 'id')) as $contact_cat) { $forms['link_type/form/' . $contact_cat->id] = $contact_cat->name; } $report_generators = array(); foreach (Components\ReportGenerator\Models\ReportGenerator::get(array('name', 'id')) as $report_generator) { $report_generators['admin/report-generators/generate/' . $report_generator->id] = $report_generator->name; } return array('/' => 'Home', 'Pages' => $pages, 'posts' => 'Posts', 'Post Categories' => $post_categories, 'Modules' => $modules, 'Contact Categories' => $contact_categories, 'Contacts' => $contacts, 'Forms' => $forms, 'Report Generators' => $report_generators, 'manual' => 'External link'); }
public function getPermisos($id) { $user = User::findOrFail($id); $permits = Module::all(); return view('Usuarios/permisos')->with("user", $user)->with("permits", $permits); }