2010-12-03 6 views
0

번역 된 값을 저장하는 데 I18n- 동작을 사용하고 있습니다.교리 테이블의 번역 된 필드를 얻는 방법

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

$tableFields = Doctrine_Core::getTable($componentName)->getFieldNames();으로 나는 교리 구성 요소의 모든 fieldName에있는 배열을 얻을 수 있습니다. 그러나 I18N 동작을 통해 변환되는 필드는이 배열에 없습니다.

내 질문 : 어떻게 번역 된 필드의 이름을 얻을 수 있습니까?

답변

0
$table = Doctrine_Core::getTable('Page'); 
$template = $table->getTemplate('I18n'); 
$options = $template->getOptions(); 
$translated_fields = $options['fields']; 
var_dump($translated_fields); 
관련 문제