@@ -42,18 +42,20 @@ public function applyDataToEntity(Column $column, RowCellSuper $cell, $data): vo
4242 $ cell ->setValueWrapper ($ data );
4343 }
4444
45- public function formatEntity (Column $ column , RowCellSuper $ cell ) {
46- $ displayName = $ cell ->getValue ();
47- if ($ cell ->getValueType () === UsergroupType::USER ) {
48- $ displayName = $ this ->userManager ->getDisplayName ($ cell ->getValue ()) ?? $ cell ->getValue ();
49- } elseif ($ cell ->getValueType () === UsergroupType::CIRCLE ) {
50- $ displayName = $ this ->circleHelper ->getCircleDisplayName ($ cell ->getValue (), ($ this ->userSession ->getUser ()?->getUID() ?: '' )) ?: $ cell ->getValue ();
51- } elseif ($ cell ->getValueType () === UsergroupType::GROUP ) {
52- $ displayName = $ this ->groupHelper ->getGroupDisplayName ($ cell ->getValue ()) ?: $ cell ->getValue ();
45+ public function formatRowData (Column $ column , array $ row ) {
46+ $ value = $ row ['value ' ];
47+ $ valueType = (int )$ row ['value_type ' ];
48+ $ displayName = $ value ;
49+ if ($ valueType === UsergroupType::USER ) {
50+ $ displayName = $ this ->userManager ->getDisplayName ($ value ) ?? $ value ;
51+ } elseif ($ valueType === UsergroupType::CIRCLE ) {
52+ $ displayName = $ this ->circleHelper ->getCircleDisplayName ($ value , ($ this ->userSession ->getUser ()?->getUID() ?: '' )) ?: $ value ;
53+ } elseif ($ valueType === UsergroupType::GROUP ) {
54+ $ displayName = $ this ->groupHelper ->getGroupDisplayName ($ value ) ?: $ value ;
5355 }
5456 return [
55- 'id ' => $ cell -> getValue () ,
56- 'type ' => $ cell -> getValueType () ,
57+ 'id ' => $ value ,
58+ 'type ' => $ valueType ,
5759 'displayName ' => $ displayName ,
5860 ];
5961 }
0 commit comments