| |
| scriptlog:lib:dao:topicdao [2026/09/26 09:09] – admin admin | scriptlog:lib:dao:topicdao [2026/09/26 09:16] (current) – admin admin |
|---|
| ======= 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) ======= |
| ======= 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 | |
| |
| |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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)'' |
| 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)'' |
| 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)'' |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| //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'' |
| 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 |
| ======= 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'']] | |
| |
| |