Pimcore\Model\Tool\UUID::createUuid PHP Method

createUuid() public method

public createUuid ( ) : mixed
return mixed
    public function createUuid()
    {
        if (!$this->getInstanceIdentifier()) {
            throw new \Exception("No instance identifier specified.");
        }
        $this->uuid = \Ramsey\Uuid\Uuid::uuid5(\Ramsey\Uuid\Uuid::NAMESPACE_DNS, $this->getInstanceIdentifier() . "~" . $this->getType() . "~" . $this->getItemId());
        $this->save();
        return $this->uuid;
    }