Implemented BlogPost->findByPermalink()
This commit is contained in:
parent
341047a9f3
commit
a54fef3f64
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Reference in a new issue