====== TopicModel ======
**Layer:** ''Model'' · **Source:** ''lib/model/TopicModel.php:21'' (lines 21–200)
----
class TopicModel extends BaseModel
======= Docblock Metadata =======
^ Tag ^ Value ^
| ''@category'' | Model class |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
======= Inheritance =======
^ Relation ^ Type ^ Meaning ^
| extends | [[scriptlog:lib:core:basemodel|''BaseModel'']] | parent class/interface |
======= Constants (0) =======
//None.//
======= Properties (1) =======
^ Visibility ^ Type ^ Name ^ Default ^ Line ^
| ''private'' | ''(untyped)'' | ''$linkPosts'' | | 29 |
======= Methods (5) =======
^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''getActiveTopicsOnSidebar()'' | getActiveTopicsOnSidebar | 39 |
| public | ''getTopicBySlug()'' | getTopicBySlug | 68 |
| public | ''getTopicById()'' | getTopicById | 90 |
| public | ''getLinkTopic()'' | getLinkTopic | 112 |
| public | ''getPostsPublishedByTopic()'' | getAllPublishedPostsByTopic | 151 |
======== getActiveTopicsOnSidebar() ========
public function getActiveTopicsOnSidebar()
//lines 39–56 (18)//
getActiveTopicsOnSidebar
retrieve all active topics and display it on sidebar themes
//Takes no parameters.//
**Returns:** ''(none declared)'' — array
======== getTopicBySlug() ========
public function getTopicBySlug($slug, $fetchMode = null)
//lines 68–80 (13)//
getTopicBySlug
retrieves topic record by it slug record
^ Parameter ^ Type ^ Default ^ Description ^
| ''$slug'' | ''(untyped)'' | //required// | //none// |
| ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |
**Returns:** ''(none declared)'' — mixed
======== getTopicById() ========
public function getTopicById($id, $fetchMode = null)
//lines 90–101 (12)//
getTopicById
^ Parameter ^ Type ^ Default ^ Description ^
| ''$id'' | ''(untyped)'' | //required// | //none// |
| ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |
**Returns:** ''(none declared)'' — mixed
======== getLinkTopic() ========
public function getLinkTopic($postId, $sanitize)
//lines 112–137 (26)//
getLinkTopic
^ Parameter ^ Type ^ Default ^ Description ^
| ''$postId'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)'' — array
======== getPostsPublishedByTopic() ========
public function getPostsPublishedByTopic($topicId, $sanitize, Paginator $perPage)
//lines 151–199 (49)//
getAllPublishedPostsByTopic
retrieves all posts published based on topic
requested and display it on category section
^ Parameter ^ Type ^ Default ^ Description ^
| ''$topicId'' | ''(untyped)'' | //required// | //none// |
| ''$sanitize'' | ''(untyped)'' | //required// | //none// |
| ''$perPage'' | [[scriptlog:lib:core:paginator|''Paginator'']] | //required// | //none// |
**Returns:** ''(none declared)'' — array
======= Imports =======
^ Alias ^ Fully-qualified name ^
| ''BaseModel'' | [[scriptlog:lib:core:basemodel|''Scriptlog\Core\BaseModel'']] |
| ''Paginator'' | [[scriptlog:lib:core:paginator|''Scriptlog\Core\Paginator'']] |
| ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] |
----
//This page is generated from source by 'tools/gendoc'. Edits will be overwritten.//