public function adminUrl($targetPath = null)
    {
        if (!isset($this->adminUrl)) {
            throw new RuntimeException(sprintf(
                'The Admin URI is not defined for [%s]',
                get_class($this)
            ));
        }

        if ($targetPath !== null) {
            return $this->createAbsoluteUrl($this->adminUrl, $targetPath);
        }

        return rtrim($this->adminUrl, '/').'/';
    }