Lavary\Menu\Builder::getUrl PHP Method

getUrl() protected method

Get the action for a "url" option.
protected getUrl ( array | string $options ) : string
$options array | string
return string
    protected function getUrl($options)
    {
        foreach ($options as $key => $value) {
            ${$key} = $value;
        }
        $secure = isset($options['secure']) && $options['secure'] === true ? true : false;
        if (is_array($url)) {
            if (self::isAbs($url[0])) {
                return $url[0];
            }
            return \URL::to($prefix . '/' . $url[0], array_slice($url, 1), $secure);
        }
        if (self::isAbs($url)) {
            return $url;
        }
        return \URL::to($prefix . '/' . $url, array(), $secure);
    }