fixed versionable template to adhere to generic plugin structure
This commit is contained in:
parent
ea5e58fece
commit
a6d05624f5
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user