Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:dao:topicdao

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scriptlog:lib:dao:topicdao [2026/09/26 09:09] – admin adminscriptlog:lib:dao:topicdao [2026/09/26 09:16] (current) – admin admin
Line 10: Line 10:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Dao Class | +| ''@category'' | Dao Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
  
-  ^ Relation ^ Type ^ Meaning ^ +^ Relation ^ Type ^ Meaning ^ 
-  | extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface |+| extends | [[scriptlog:lib:core:dao|''Dao'']] | parent class/interface |
  
 ======= Constants (0) ======= ======= Constants (0) =======
Line 32: Line 32:
 ======= Methods (20) ======= ======= Methods (20) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' | overrides Dao constructor | 25 | +| public | ''__construct()'' | overrides Dao constructor | 25 | 
-  | public | ''findTopics()'' | Find All Topics | 38 | +| public | ''findTopics()'' | Find All Topics | 38 | 
-  | public | ''findActiveTopicsPaginated()'' | Find active topics with pagination and post count for API | 58 | +| public | ''findActiveTopicsPaginated()'' | Find active topics with pagination and post count for API | 58 | 
-  | public | ''countActiveTopics()'' | Count active topics | 86 | +| public | ''countActiveTopics()'' | Count active topics | 86 | 
-  | public | ''findTopicWithPostCount()'' | Find a single topic with post count | 100 | +| public | ''findTopicWithPostCount()'' | Find a single topic with post count | 100 | 
-  | public | ''findPostsByTopicPaginated()'' | Find published posts by topic with pagination | 126 | +| public | ''findPostsByTopicPaginated()'' | Find published posts by topic with pagination | 126 | 
-  | public | ''countPostsByTopic()'' | Count published posts by topic | 157 | +| public | ''countPostsByTopic()'' | Count published posts by topic | 157 | 
-  | public | ''findTopicById()'' | Find Topic by ID | 180 | +| public | ''findTopicById()'' | Find Topic by ID | 180 | 
-  | public | ''findPostTopic()'' | findPostTopic | 201 | +| public | ''findPostTopic()'' | findPostTopic | 201 | 
-  | public | ''createTopic()'' | Insert a new records | 220 | +| public | ''createTopic()'' | Insert a new records | 220 | 
-  | public | ''updateTopic()'' | Update an existing records | 240 | +| public | ''updateTopic()'' | Update an existing records | 240 | 
-  | public | ''deleteTopic()'' | Delete an existing records | 259 | +| public | ''deleteTopic()'' | Delete an existing records | 259 | 
-  | public | ''setCheckBoxTopic()'' | Set topic | 274 | +| public | ''setCheckBoxTopic()'' | Set topic | 274 | 
-  | public | ''checkTopicId()'' | Check Id'topic | 347 | +| public | ''checkTopicId()'' | Check Id'topic | 347 | 
-  | public | ''findTopicBySlug()'' | Find a topic by slug (for duplicate checking). | 369 | +| public | ''findTopicBySlug()'' | Find a topic by slug (for duplicate checking). | 369 | 
-  | public | ''insertTopicApi()'' | Insert a topic with the given data and return the new ID. | 382 | +| public | ''insertTopicApi()'' | Insert a topic with the given data and return the new ID. | 382 | 
-  | public | ''updateTopicApi()'' | Update specific topic fields. | 395 | +| public | ''updateTopicApi()'' | Update specific topic fields. | 395 | 
-  | public | ''deleteTopicCascade()'' | Delete topic relationships then the topic itself. | 406 | +| public | ''deleteTopicCascade()'' | Delete topic relationships then the topic itself. | 406 | 
-  | public | ''totalTopicRecords()'' | (undocumented) | 412 | +| public | ''totalTopicRecords()'' | (undocumented) | 412 | 
-  | public | ''dropDownLocale()'' | Drop down locale | 426 |+| public | ''dropDownLocale()'' | Drop down locale | 426 |
  
  
Line 78: Line 78:
 Find All Topics Find All Topics
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// |+|  ''$orderBy'' |  ''(untyped)'' |  '''ID''' |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 94: Line 94:
 Find active topics with pagination and post count for API Find active topics with pagination and post count for API
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// | +|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$offset'' | ''(untyped)'' | //required// | //none// | +|  ''$offset'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sortBy'' | ''(untyped)'' | '''ID''' | //none// | +|  ''$sortBy'' |  ''(untyped)'' |  '''ID''' |  //none// | 
-  | ''$sortOrder'' | ''(untyped)'' | '''DESC''' | //none// |+|  ''$sortOrder'' |  ''(untyped)'' |  '''DESC''' |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 128: Line 128:
 Find a single topic with post count Find a single topic with post count
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// |+|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array|false **Returns:** ''(none declared)'' — array|false
Line 144: Line 144:
 Find published posts by topic with pagination Find published posts by topic with pagination
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// | +|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$limit'' | ''(untyped)'' | //required// | //none// | +|  ''$limit'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$offset'' | ''(untyped)'' | //required// | //none// | +|  ''$offset'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sortBy'' | ''(untyped)'' | '''ID''' | //none// | +|  ''$sortBy'' |  ''(untyped)'' |  '''ID''' |  //none// | 
-  | ''$sortOrder'' | ''(untyped)'' | '''DESC''' | //none// |+|  ''$sortOrder'' |  ''(untyped)'' |  '''DESC''' |  //none// |
  
 **Returns:** ''(none declared)'' — array **Returns:** ''(none declared)'' — array
Line 164: Line 164:
 Count published posts by topic Count published posts by topic
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// |+|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — integer **Returns:** ''(none declared)'' — integer
Line 180: Line 180:
 Find Topic by ID Find Topic by ID
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// | +|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// | +|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$fetchMode'' | ''(untyped)'' | ''null'' | //none// |+|  ''$fetchMode'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — mixed **Returns:** ''(none declared)'' — mixed
Line 198: Line 198:
 findPostTopic findPostTopic
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// | +|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$postId'' | ''(untyped)'' | //required// | //none// |+|  ''$postId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — boolean|array|object **Returns:** ''(none declared)'' — boolean|array|object
Line 215: Line 215:
 Insert a new records Insert a new records
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$bind'' | ''(untyped)'' | //required// | //none// |+|  ''$bind'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 231: Line 231:
 Update an existing records Update an existing records
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// | +|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$bind'' | ''(untyped)'' | //required// | //none// | +|  ''$bind'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// |+|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 249: Line 249:
 Delete an existing records Delete an existing records
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// | +|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitize'' | ''(untyped)'' | //required// | //none// |+|  ''$sanitize'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 268: Line 268:
 post category post category
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$postId'' | ''(untyped)'' | ''null'' | //none// | +|  ''$postId'' |  ''(untyped)'' |  ''null'' |  //none// | 
-  | ''$checked'' | ''(untyped)'' | ''null'' | //none// |+|  ''$checked'' |  ''(untyped)'' |  ''null'' |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 285: Line 285:
 Check Id'topic Check Id'topic
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$id'' | ''(untyped)'' | //required// | //none// | +|  ''$id'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$sanitizing'' | ''(untyped)'' | //required// | //none// |+|  ''$sanitizing'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — numeric **Returns:** ''(none declared)'' — numeric
Line 302: Line 302:
 Find a topic by slug (for duplicate checking). Find a topic by slug (for duplicate checking).
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$slug'' | ''(untyped)'' | //required// | //none// |+|  ''$slug'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — array|false **Returns:** ''(none declared)'' — array|false
Line 318: Line 318:
 Insert a topic with the given data and return the new ID. Insert a topic with the given data and return the new ID.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | //required// | //none// |+|  ''$data'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — int **Returns:** ''(none declared)'' — int
Line 334: Line 334:
 Update specific topic fields. Update specific topic fields.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// | +|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$data'' | ''array'' | //required// | //none// |+|  ''$data'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 351: Line 351:
 Delete topic relationships then the topic itself. Delete topic relationships then the topic itself.
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$topicId'' | ''(untyped)'' | //required// | //none// |+|  ''$topicId'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — void **Returns:** ''(none declared)'' — void
Line 365: Line 365:
 //lines 412–417 (6)// //lines 412–417 (6)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$data'' | ''array'' | ''[]'' | //none// |+|  ''$data'' |  ''array'' |  ''[]'' |  //none// |
  
 **Returns:** ''?int'' **Returns:** ''?int''
Line 381: Line 381:
 Drop down locale Drop down locale
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$selected'' | ''(untyped)'' | ''""'' | //none// |+|  ''$selected'' |  ''(untyped)'' |  ''""'' |  //none// |
  
 **Returns:** ''(none declared)'' — string **Returns:** ''(none declared)'' — string
Line 388: Line 388:
 ======= Imports ======= ======= Imports =======
  
-  ^ Alias ^ Fully-qualified name ^ +^ Alias ^ Fully-qualified name ^ 
-  | ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] |+| ''Dao'' | [[scriptlog:lib:core:dao|''Scriptlog\Core\Dao'']] |
  
  
scriptlog/lib/dao/topicdao.txt · Last modified: by admin