Commit e8bb04a6 authored by Jonathan.Wage's avatar Jonathan.Wage

Reverted change. actAs() and loadTemplate() currently only work in the setTableDefinition()

parent deabfcbb
...@@ -325,7 +325,7 @@ END; ...@@ -325,7 +325,7 @@ END;
* @param string $table * @param string $table
* @param array $tableColumns * @param array $tableColumns
*/ */
public function buildTableDefinition(array $options, array $columns, array $relations, array $indexes, array $attributes, array $tableOptions) public function buildTableDefinition(array $options, array $columns, array $relations, array $indexes, array $attributes, array $tableOptions, array $templates, array $actAs)
{ {
$ret = array(); $ret = array();
...@@ -376,6 +376,13 @@ END; ...@@ -376,6 +376,13 @@ END;
$i++; $i++;
$ret[$i] = $this->buildTableOptions($tableOptions); $ret[$i] = $this->buildTableOptions($tableOptions);
$i++;
$ret[$i] = $this->buildTemplates($templates);
$i++;
$ret[$i] = $this->buildActAs($actAs);
$i++;
$code = implode("\n", $ret); $code = implode("\n", $ret);
$code = trim($code); $code = trim($code);
...@@ -585,12 +592,6 @@ END; ...@@ -585,12 +592,6 @@ END;
$ret[$i] = " ".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => \''.$options['inheritance']['keyValue'].'\'));'; $ret[$i] = " ".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => \''.$options['inheritance']['keyValue'].'\'));';
} }
$ret[$i] = $this->buildTemplates($templates);
$i++;
$ret[$i] = $this->buildActAs($actAs);
$i++;
$code = implode("\n", $ret); $code = implode("\n", $ret);
$code = trim($code); $code = trim($code);
...@@ -622,7 +623,7 @@ END; ...@@ -622,7 +623,7 @@ END;
$extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:$this->_baseClassName; $extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:$this->_baseClassName;
if ( ! (isset($options['no_definition']) && $options['no_definition'] === true)) { if ( ! (isset($options['no_definition']) && $options['no_definition'] === true)) {
$definition = $this->buildTableDefinition($options, $columns, $relations, $indexes, $attributes, $tableOptions); $definition = $this->buildTableDefinition($options, $columns, $relations, $indexes, $attributes, $tableOptions, $templates, $actAs);
$setUp = $this->buildSetUp($options, $columns, $relations, $templates, $actAs); $setUp = $this->buildSetUp($options, $columns, $relations, $templates, $actAs);
} else { } else {
$definition = null; $definition = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment