Mmmm, Verbesserung meines Antwort:
https://docs.contao.org/dev/referenc...st-label-label
-> "list view".
contao\dca\tl_member.php:
PHP-Code:
$GLOBALS['TL_DCA']['tl_member']['list']['label'] = array
(
'showColumns' => true,
'fields' => array('username', 'pid:tl_vv_company.company', 'groups', 'license_enddt', 'dateAdded','usage')
//'label_callback' => array('TlMemberEventListener', 'tlMemberLabelCallback')->nicht notwendig
);
Und
src/EventListener/DataContainer/MemberLabelCallbackListener.php
PHP-Code:
<?php
namespace App\EventListener\DataContainer;
use Contao\CoreBundle\ServiceAnnotation\Callback;
use Contao\DataContainer;
/**
* @Callback(table="tl_member", target="list.label.label")
*/
class MemberLabelCallbackListener
{
public function __invoke(array $row, string $label, DataContainer $dc, array $labels): array
{
$labels[0]= "A";
return $labels;
}
}