From 93ef642c25d65519b334fecad56bf6567eeb733b Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 6 Jul 2015 22:42:14 +0200 Subject: single file edit: jump to file after saving --- src/phorkie/File.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/phorkie/File.php b/src/phorkie/File.php index 9eb7fa7..2afda4c 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -38,6 +38,16 @@ class File return $this->path; } + /** + * Get the filename usable as HTML anchor. + * + * @return string + */ + function getAnchorName() + { + return str_replace(' ', '-', $this->getFilename()); + } + /** * Return the full path to the file * -- cgit v1.2.3