Backend\ModuleBuilderController::edit PHP 메소드

edit() 공개 메소드

Show the form for editing the module.
public edit ( integer $id )
$id integer
    public function edit($id)
    {
        $module = BuiltModule::findOrFail($id);
        $selected_forms = explode(', ', $module->form_id);
        if (($key = array_search('0', $selected_forms)) !== false) {
            // Remove forms with id 0
            unset($selected_forms[$key]);
        }
        $select = $this->formDropdownSources($id);
        $all_modules = Module::latest()->lists('name', 'id');
        $this->layout->title = 'Edit Existing Built Module';
        $this->layout->content = View::make($this->link_type . '.' . $this->current_theme . '.module_builders.create_edit')->with('all_modules', $all_modules)->with('module', $module)->with('selected_forms', $selected_forms)->with('select', $select);
    }