Beispiel #1
0
 public function postEditAction(Dynamic $form, Record $record, Table $table, Entity $entity)
 {
     if ($this->post('copy_to_language')) {
         die('copying to language is not implemented ... yet ;-)');
     }
     $table = $this->router()->resolved('table');
     $entity = $table->createEntity();
     $record->setEntity($entity);
     $form->setTable($table);
     $form->initFields();
     if ($entity->isTranslatable()) {
         $form->initLanguageFields();
     }
     $form->populateFromRequest();
     $form->populateToRecord($record);
     $form->populatePasswords($record);
     $record->save($entity);
     if ($this->post()->p17n) {
         $this->saveP17n($record, $entity);
     }
     flash('dynamic.records.edit.success', __('dynamic.records.edit.success'));
     return $this->response()->respondWithSuccessRedirect();
 }
Beispiel #2
0
 public function getEditTableAction(DynamicForm $dynamicForm, TableRecord $tableRecord)
 {
     $dynamicForm->populateFromRecord($tableRecord);
     return $this->formalize($dynamicForm, $tableRecord, 'Edit dynamic table');
 }