Commit a6d05624 authored by zYne's avatar zYne

fixed versionable template to adhere to generic plugin structure

parent ea5e58fe
......@@ -39,8 +39,6 @@ class Doctrine_AuditLog extends Doctrine_Plugin
'pluginTable' => false,
);
protected $_auditTable;
public function __construct($options)
{
$this->_options = array_merge($this->_options, $options);
......
......@@ -31,21 +31,19 @@
*/
class Doctrine_Template_Versionable extends Doctrine_Template
{
protected $_auditLog;
public function __construct(array $options)
{
$this->_auditLog = new Doctrine_AuditLog($options);
$this->_plugin = new Doctrine_AuditLog($options);
}
public function setUp()
{
$this->_auditLog->setOption('table', $this->_table);
$this->_auditLog->buildDefinition($this->_table);
$this->_plugin->setOption('table', $this->_table);
$this->_plugin->buildDefinition($this->_table);
$this->addListener(new Doctrine_AuditLog_Listener($this->_auditLog));
$this->addListener(new Doctrine_AuditLog_Listener($this->_plugin));
}
public function getAuditLog()
{
return $this->_auditLog;
return $this->_plugin;
}
}
\ No newline at end of file
}
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