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:
the_undefined 2008-05-19 05:38:32 +00:00
parent 0662d595cb
commit b1ff00d0d3

View file

@ -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');
}
/**