chapter hgroup + calming decor
This commit is contained in:
parent
0545b131de
commit
94d14d70c1
370 changed files with 9583 additions and 1566 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace Kirby\Http;
|
||||
|
||||
use Kirby\Toolkit\Str;
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
|
||||
/**
|
||||
* Static URL tools
|
||||
|
|
@ -63,6 +64,23 @@ class Url
|
|||
return dirname(static::current());
|
||||
}
|
||||
|
||||
/**
|
||||
* Use Whoops to create an editor URL to open
|
||||
* a file at the given line number
|
||||
* @since 5.3.0
|
||||
*/
|
||||
public static function editor(string|false $editor, string|null $file, int $line = 0): string|null
|
||||
{
|
||||
if ($editor === false || $file === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$handler = new PrettyPageHandler();
|
||||
$handler->setEditor($editor);
|
||||
|
||||
return $handler->getEditorHref($file, $line);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to fix a broken url without protocol
|
||||
* @psalm-return ($url is null ? string|null : string)
|
||||
|
|
@ -223,6 +241,7 @@ class Url
|
|||
|
||||
/**
|
||||
* Smart resolver for internal and external urls
|
||||
* @deprecated 5.3.0 Use `Kirby\Cms\Url::to()` instead
|
||||
*/
|
||||
public static function to(
|
||||
string|null $path = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue