<?php

namespace AutoAdmin\Bundle\Content\Entity\Traits;

trait ContentToStringTrait
{
    public function __toString(): string
    {
        $parts = explode('\\', get_class($this));
        $name = array_pop($parts);

        return sprintf('%s#%s', $name, $this?->getId() ?: '0');
    }
}
