src/Charcoal/Admin/Support/BaseUrlTrait.php
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, '/').'/';
    }
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, '/').'/';
    }
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 , '/' ) . '/' ; }
Retrieve the URI of the administration-area.

@param  mixed $targetPath Optional target path.
@throws RuntimeException If the admin URI is missing.
@return UriInterface|null
Retrieve the URI of the administration - area .