<?php

/*
 * This file is part of the Serenity package.
 *
 * (c) CP Creation <web@cpcreation.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CpCreation\VitiCore\Behavior\Impl;

use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;

trait Translation
{
    use TranslationTrait;

    public static function getTranslatableEntityClass(): string
    {
        $explodedNamespace = explode('\\', __CLASS__);
        $entityClass = array_pop($explodedNamespace);
        // Remove Translation namespace
        array_pop($explodedNamespace);

        return '\\'.implode('\\', $explodedNamespace).'\\'.mb_substr($entityClass, 0, -11);
    }
}
