@@ -128,12 +128,15 @@ class Builder
128128 * @param IMetaModelsServiceContainer $serviceContainer The name of the MetaModel being created.
129129 *
130130 * @param IInputScreen $inputScreen The input screen to use.
131+ *
132+ * @param int $renderSetting The render setting.
131133 */
132- public function __construct ($ serviceContainer , $ inputScreen )
134+ public function __construct ($ serviceContainer , $ inputScreen, $ renderSetting )
133135 {
134136 $ this ->serviceContainer = $ serviceContainer ;
135137 $ this ->inputScreen = $ inputScreen ;
136138 $ this ->translator = new StaticTranslator ();
139+ $ this ->renderSetting = $ renderSetting ;
137140 }
138141
139142 /**
@@ -1113,11 +1116,14 @@ protected function parseListLabel(IMetaModelDataDefinition $container, ListingCo
11131116 } else {
11141117 $ formatter = $ listing ->getLabelFormatter ($ providerName );
11151118 }
1116-
1119+ $ renderSetting = $ this ->serviceContainer ->getRenderSettingFactory ()->createCollection (
1120+ $ this ->getMetaModel (),
1121+ $ this ->renderSetting
1122+ );
11171123 $ formatter ->setPropertyNames (
11181124 array_merge (
11191125 $ formatter ->getPropertyNames (),
1120- $ container -> getPropertiesDefinition ()-> getPropertyNames ()
1126+ $ renderSetting -> getSettingNames ()
11211127 )
11221128 );
11231129
@@ -1349,7 +1355,7 @@ protected function buildPropertyFromDca(
13491355 $ metaModel = $ this ->getMetaModel ();
13501356 $ attribute = $ metaModel ->getAttribute ($ propName );
13511357
1352- if (!$ attribute || ! $ propInfo ) {
1358+ if (!$ attribute ) {
13531359 return ;
13541360 }
13551361
@@ -1362,16 +1368,20 @@ protected function buildPropertyFromDca(
13621368 $ definition ->addProperty ($ property );
13631369 }
13641370
1365- if (!$ property ->getLabel () && isset ($ propInfo ['label ' ])) {
1366- $ lang = $ propInfo ['label ' ];
1371+ if (!$ property ->getLabel ()) {
1372+ if (isset ($ propInfo ['label ' ])) {
1373+ $ lang = $ propInfo ['label ' ];
13671374
1368- if (is_array ($ lang )) {
1369- $ label = reset ($ lang );
1370- $ description = next ($ lang );
1375+ if (is_array ($ lang )) {
1376+ $ label = reset ($ lang );
1377+ $ description = next ($ lang );
13711378
1372- $ property ->setDescription ($ description );
1379+ $ property ->setDescription ($ description );
1380+ } else {
1381+ $ label = $ lang ;
1382+ }
13731383 } else {
1374- $ label = $ lang ;
1384+ $ label = $ attribute -> getName () ;
13751385 }
13761386
13771387 $ property ->setLabel ($ label );
0 commit comments