Skip to content

Commit

Permalink
Fix PR #383, fixing #328 again (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricpelo authored and samdark committed Nov 23, 2018
1 parent 26faa5c commit 89c3865
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generators/crud/default/views/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
$modelClassName = Inflector::camel2words(StringHelper::basename($generator->modelClass));
$nameAttributeTemplate = '$model->' . $generator->getNameAttribute();
$titleTemplate = $generator->generateString('Update ' . $modelClassName . ': {name}', ['name' => '{nameAttribute}']);
$title = strtr($titleTemplate, ['\'{nameAttribute}\'' => $nameAttributeTemplate]);
if ($generator->enableI18N) {
$title = strtr($titleTemplate, ['\'{nameAttribute}\'' => $nameAttributeTemplate]);
} else {
$title = strtr($titleTemplate, ['{nameAttribute}\'' => '\' . ' . $nameAttributeTemplate]);
}

echo "<?php\n";
?>
Expand Down

0 comments on commit 89c3865

Please sign in to comment.