single file edit: jump to file after saving
[phorkie.git] / src / phorkie / File.php
index 9eb7fa7002be4463442c1a4c81b596352b5ec895..2afda4c89fc8b2514ebef68a41d5ba3e1bc499aa 100644 (file)
@@ -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
      *