src/Utils/BaseEntity.php
public function entityUrl($operation, $argument1 = '', $argument2 = '')
    {
        if ('visit' === $operation) {
            $operation = 'view';
        }

        // An empty string could be passed when currently viewing entity expected.
        $id = '' === $argument1 ? $this->getCurrentId() : $this->getIdByArguments($argument1, $argument2);

        if (0 === $id) {
            throw new \RuntimeException('An ID cannot be zero.');
        }

        return $this->entityType() . "/$id/$operation";
    }
public function entityUrl($operation, $argument1 = '', $argument2 = '')
    {
        if ('visit' === $operation) {
            $operation = 'view';
        }

        // An empty string could be passed when currently viewing entity expected.
        $id = '' === $argument1 ? $this->getCurrentId() : $this->getIdByArguments($argument1, $argument2);

        if (0 === $id) {
            throw new \RuntimeException('An ID cannot be zero.');
        }

        return $this->entityType() . "/$id/$operation";
    }
@param string $operation
Allowable values: "edit", "view", "visit".
@param string $argument1
An argument to clarify the result.
@param string $argument2
An argument to clarify the result.

@return string
Entity URL.