How to get the translated fields of a doctrine table
I'm using I18n-behaviour to store translated values.
$i18n = new Doctrine_Template_I18n(array('fields' => array('title', 'text')));
$this->actAs($i18n);
With $tableFields = Doctrine_Core::getTable($componentName)->getFieldNames();
I can get开发者_运维技巧 a array with all the fieldnames of the doctrine component. However the fields that are being translated through the I18N-behaviour are not present in this array.
My question: how can i get the names of translated fields?
$table = Doctrine_Core::getTable('Page');
$template = $table->getTemplate('I18n');
$options = $template->getOptions();
$translated_fields = $options['fields'];
var_dump($translated_fields);
精彩评论