Archived
1
0
Fork 0

Implemented BlogPost->findByPermalink()

This commit is contained in:
Fredric N 2010-10-21 19:04:54 +02:00
parent 341047a9f3
commit a54fef3f64

View file

@ -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) {