2010-12-03 4 views
0

翻訳された値を格納するためにI18n動作を使用しています。 $tableFields = Doctrine_Core::getTable($componentName)->getFieldNames();教義テーブルの翻訳されたフィールドを取得する方法

$i18n = new Doctrine_Template_I18n(array('fields' => array('title', 'text'))); 
$this->actAs($i18n); 

私は教義コンポーネントのすべてのフィールド名を配列で取得することができます。ただし、I18Nビヘイビアによって変換されているフィールドは、この配列には存在しません。

私の質問:翻訳されたフィールドの名前はどのように取得できますか?

答えて

0
$table = Doctrine_Core::getTable('Page'); 
$template = $table->getTemplate('I18n'); 
$options = $template->getOptions(); 
$translated_fields = $options['fields']; 
var_dump($translated_fields); 
関連する問題