mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Add displayField and primaryKey to controller bake. Fixes #1192
Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
d0c2b9c9d1
commit
e16d21eaa3
1 changed files with 6 additions and 2 deletions
|
@ -282,9 +282,13 @@ class ControllerTask extends BakeTask {
|
|||
$singularName = Inflector::variable($currentModelName);
|
||||
$singularHumanName = $this->_singularHumanName($controllerName);
|
||||
$pluralHumanName = $this->_pluralName($controllerName);
|
||||
$displayField = $modelObj->displayField;
|
||||
$primaryKey = $modelObj->primaryKey;
|
||||
|
||||
$this->Template->set(compact('plugin', 'admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',
|
||||
'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName'));
|
||||
$this->Template->set(compact('plugin', 'admin', 'controllerPath', 'pluralName', 'singularName',
|
||||
'singularHumanName', 'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName',
|
||||
'displayField', 'primaryKey'
|
||||
));
|
||||
$actions = $this->Template->generate('actions', 'controller_actions');
|
||||
return $actions;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue