private function drawAttribute(ModelToLabelEvent $event)
    {
        $model     = $event->getModel();
        $metaModel = $this->getMetaModelFromModel($model);
        $attribute = $metaModel->getAttributeById($model->getProperty('attr_id'));

        if ($attribute) {
            $type     = $attribute->get('type');
            $image    = $this->iconBuilder->getBackendIconImageTag(
                $this->attributeFactory->getIconForType($type),
                $type,
                '',
                'bundles/metamodelscore/images/icons/fields.png'
            );
            $name     = $attribute->getName();
            $colName  = $attribute->getColName();
            $isUnique = $attribute->get('isunique');
        } else {
            $type     = 'unknown ID: ' . $model->getProperty('attr_id');
            $image    = $this->iconBuilder->getBackendIconImageTag('bundles/metamodelscore/images/icons/fields.png');
            $name     = 'unknown attribute';
            $colName  = 'unknown column';
            $isUnique = false;
        }

        $event
            ->setLabel('<div class="field_heading cte_type %s"><strong>%s</strong> <em>[%s]</em></div>
                <div class="field_type block">
                    %s<strong>%s</strong><span class="mandatory">%s</span> <span class="tl_class">%s</span>
                </div>')
            ->setArgs([
                $model->getProperty('published') ? 'published' : 'unpublished',
                $colName,
                $type,
                $image,
                $name,
                // unique attributes are automatically mandatory
                $model->getProperty('mandatory') || $isUnique
                    ? ' ['. $this->trans('mandatory.0') . ']'
                    : '',
                $model->getProperty('tl_class') ? sprintf('[%s]', $model->getProperty('tl_class')) : ''
            ]);
    }