Commit 3e31860e authored by Jonathan.Wage's avatar Jonathan.Wage

Troubleshooting why this does not work and I cleaned up the code.

parent 231b42eb
......@@ -40,13 +40,23 @@ class Doctrine_I18n extends Doctrine_Plugin
'pluginTable' => false,
);
protected $_auditTable;
/**
* __construct
*
* @param string $options
* @return void
*/
public function __construct($options)
{
$this->_options = array_merge($this->_options, $options);
}
/**
* buildDefinition
*
* @param object $Doctrine_Table
* @return void
*/
public function buildDefinition(Doctrine_Table $table)
{
if (empty($this->_options['fields'])) {
......
......@@ -34,7 +34,12 @@ class Doctrine_Template_I18n extends Doctrine_Template
{
protected $_translation;
/**
* __construct
*
* @param string $array
* @return void
*/
public function __construct(array $options)
{
$this->_plugin = new Doctrine_I18n($options);
......@@ -42,6 +47,7 @@ class Doctrine_Template_I18n extends Doctrine_Template
/**
* translation
*
* sets or retrieves the current translation language
*
* @return Doctrine_Record this object
......@@ -49,7 +55,15 @@ class Doctrine_Template_I18n extends Doctrine_Template
public function translation($language = null)
{
$this->_translation = $language;
return $this->_translation;
}
/**
* setUp
*
* @return void
*/
public function setUp()
{
$this->_plugin->setOption('table', $this->_table);
......@@ -67,6 +81,12 @@ class Doctrine_Template_I18n extends Doctrine_Template
$this->hasMany($className . ' as Translation', array('local' => $id, 'foreign' => $id));
}
/**
* getI18n
*
* @return void
*/
public function getI18n()
{
return $this->_plugin;
......
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