diff --git a/application/models/Mapper/BlogPost.php b/application/models/Mapper/BlogPost.php index feb9a51..2da8c69 100644 --- a/application/models/Mapper/BlogPost.php +++ b/application/models/Mapper/BlogPost.php @@ -57,6 +57,15 @@ class Mapper_BlogPost extends Fiktiv_Model_Mapper_DbTableAbstract return null; } + public function findByPermalink($permalink) + { + if (is_string($permalink)) { + return $this->_createBlogPost($this->_dbTable->fetchRow($this->quoteInto('permalink LIKE ?', $permalink))); + } + + return null; + } + public function findAllPostByAuthor($user) { if ($user instanceof User) {