Example #1
0
 /**
  * Gets title based on the view slug
  *
  * @return string
  */
 public function getTitle()
 {
     try {
         $this->render();
         return $this->get('title');
     } catch (\OutOfBoundsException $ex) {
         $file = new \SplFileInfo($this->filename);
         return Application::slugToTitle($file->getBasename('.' . $file->getExtension()));
     }
 }
Example #2
0
 /**
  * Gets post title based on slug
  *
  * @return string
  */
 public function title()
 {
     return Application::slugToTitle($this->slug);
 }