mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Made schema available to bake view templates, fixes #4216
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6949 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0662d595cb
commit
b1ff00d0d3
1 changed files with 4 additions and 2 deletions
|
@ -260,7 +260,8 @@ class ViewTask extends Shell {
|
|||
$pluralVar = Inflector::variable($this->controllerName);
|
||||
$singularHumanName = Inflector::humanize($modelClass);
|
||||
$pluralHumanName = Inflector::humanize($this->controllerName);
|
||||
$fields = array_keys($modelObj->schema());
|
||||
$schema = $modelObj->schema();
|
||||
$fields = array_keys($schema);
|
||||
$associations = $this->__associations($modelObj);
|
||||
} else {
|
||||
$primaryKey = null;
|
||||
|
@ -270,10 +271,11 @@ class ViewTask extends Shell {
|
|||
$singularHumanName = Inflector::humanize(Inflector::singularize($this->controllerName));
|
||||
$pluralHumanName = Inflector::humanize($this->controllerName);
|
||||
$fields = array();
|
||||
$schema = array();
|
||||
$associations = array();
|
||||
}
|
||||
|
||||
return compact('modelClass', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',
|
||||
return compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',
|
||||
'singularHumanName', 'pluralHumanName', 'fields','associations');
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue