Commit 07077ca1 authored by Patrick Barroca's avatar Patrick Barroca 😁
Browse files

api compatibility

parent 086f8334
......@@ -32,7 +32,7 @@ class ZendAfi_Controller_Plugin_ResourceDefinition_DocType extends ZendAfi_Contr
'index' => ['title' => 'Types de documents']
],
'after_edit' => function($model) {$this->_redirect('/admin/type-docs');},
'form' => ZendAfi_Form_TypeDocs_Edit::newWith($this->_getParam('id'))];
'form' => ZendAfi_Form_TypeDocs_Edit::newWithId($this->_getParam('id'))];
}
}
?>
\ No newline at end of file
......@@ -23,11 +23,11 @@
class ZendAfi_Form_TypeDocs_Edit extends ZendAfi_Form {
use Trait_Translator;
public static function newWith($id_type_doc) {
public static function newWithId($id_type_doc) {
$form = new self();
if (!$id_type_doc)
return $form;
$type_doc= Class_TypeDoc::find($id_type_doc);
if (!$type_doc->isRessourceNumerique())
return $form;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment