File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,19 @@ public function setTableDefinition()
8080 $ options = array ('className ' => $ this ->_options ['className ' ]);
8181
8282 $ cols = $ this ->_options ['table ' ]->getColumns ();
83+ $ table = $ this ->_options ['table ' ];
84+
85+ $ columnNames = (array ) $ table ->getOption ('generator_i18n_columnNames ' );
86+ $ columns = (array ) $ table ->getOption ('generator_i18n_columns ' );
87+ $ fieldNames = (array ) $ table ->getOption ('generator_i18n_fieldNames ' );
8388
84- $ columns = array ();
8589 foreach ($ cols as $ column => $ definition ) {
8690 $ fieldName = $ this ->_options ['table ' ]->getFieldName ($ column );
8791 if (in_array ($ fieldName , $ this ->_options ['fields ' ])) {
92+ $ columnNames [$ fieldName ] = $ column ;
93+ $ fieldNames [$ column ] = $ cols ;
94+ $ columns [$ column ] = $ definition ;
95+
8896 if ($ column != $ fieldName ) {
8997 $ column .= ' as ' . $ fieldName ;
9098 }
@@ -93,6 +101,10 @@ public function setTableDefinition()
93101 }
94102 }
95103
104+ $ table ->setOption ('generator_i18n_columnNames ' , $ columnNames );
105+ $ table ->setOption ('generator_i18n_columns ' , $ columns );
106+ $ table ->setOption ('generator_i18n_fieldNames ' , $ fieldNames );
107+
96108 $ this ->hasColumns ($ columns );
97109
98110 $ defaultOptions = array (
You can’t perform that action at this time.
0 commit comments