src/Entity/Service/IdService.php
public function generateCustomId(CustomIdentifiable $entity, bool $overwrite = false)
    {
        if (null === $entity->getCustomId() || $overwrite) {
            $customId = uniqid();
            $entity->setCustomId($customId);
        }

        return $this;
    }
public function generateCustomId(CustomIdentifiable $entity, bool $overwrite = false)
    {
        if (null === $entity->getCustomId() || $overwrite) {
            $customId = uniqid();
            $entity->setCustomId($customId);
        }

        return $this;
    }
public function generateCustomId ( CustomIdentifiable $ entity , bool $ overwrite = false ) { if ( null === $ entity -> getCustomId ( ) || $ overwrite ) { $ customId = uniqid ( ) ; $ entity -> setCustomId ( $ customId ) ; } return $ this ; }
Generate entity custom id, if none present

@param \Ds\Component\Model\Type\CustomIdentifiable $entity
@param boolean $overwrite
@return \Ds\Component\Entity\Service\IdService
Generate entity custom id if none present