modelGenerator: use the titles and foreign methods instead of using the properties
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3776 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -142,22 +142,22 @@ class modelGenerator
|
||||
}
|
||||
$f .= "\n";
|
||||
$f .= " // The titles\n";
|
||||
$f .= " \$this->titles = array (\n";
|
||||
$f .= " \$this->titles (array (\n";
|
||||
foreach ($schema["fields"] as $field=>$params)
|
||||
{
|
||||
$f .= " \"$field\" => _(\"$field\"),\n";
|
||||
}
|
||||
$f .= " );\n";
|
||||
$f .= " ));\n";
|
||||
if (count ($schema["foreign"]))
|
||||
{
|
||||
$f .= "\n";
|
||||
$f .= " // The foreign constraints\n";
|
||||
$f .= " \$this->foreign = array (\n";
|
||||
$f .= " \$this->foreign (array (\n";
|
||||
foreach ($schema["foreign"] as $field=>$params)
|
||||
$f .= " \"$field\" => array (\n \"".
|
||||
implode ("\", \"", $params).
|
||||
"\"),\n";
|
||||
$f .= " );\n";
|
||||
$f .= " ));\n";
|
||||
}
|
||||
|
||||
$f .= " }\n";
|
||||
|
||||
Reference in New Issue
Block a user