| Next revision | Previous revision |
| scriptlog:lib:service:pageservice [2026/09/26 09:09] – admin admin | scriptlog:lib:service:pageservice [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Service Class | | | ''@category'' | Service 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 ======= |
| //None.// | //None.// |
| |
| ======= Properties (0) ======= | ======= Properties (19) ======= |
| |
| //None declared.// | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | | ''private'' | ''(untyped)'' | ''$pageId'' | | 32 | |
| | | ''private'' | ''(untyped)'' | ''$post_image'' | | 39 | |
| | | ''private'' | ''(untyped)'' | ''$author'' | | 47 | |
| | | ''private'' | ''(untyped)'' | ''$post_date'' | | 55 | |
| | | ''private'' | ''(untyped)'' | ''$post_modified'' | | 63 | |
| | | ''private'' | ''(untyped)'' | ''$title'' | | 71 | |
| | | ''private'' | ''(untyped)'' | ''$slug'' | | 80 | |
| | | ''private'' | ''(untyped)'' | ''$content'' | | 88 | |
| | | ''private'' | ''(untyped)'' | ''$meta_desc'' | | 96 | |
| | | ''private'' | ''(untyped)'' | ''$post_tags'' | | 104 | |
| | | ''private'' | ''(untyped)'' | ''$page_status'' | | 112 | |
| | | ''private'' | ''(untyped)'' | ''$page_sticky'' | | 120 | |
| | | ''private'' | ''(untyped)'' | ''$post_type'' | | 128 | |
| | | ''private'' | ''(untyped)'' | ''$comment_status'' | | 136 | |
| | | ''private'' | ''(untyped)'' | ''$page_locale'' | | 144 | |
| | | ''private'' | ''(untyped)'' | ''$pageDao'' | | 152 | |
| | | ''private'' | ''(untyped)'' | ''$validator'' | | 160 | |
| | | ''private'' | ''(untyped)'' | ''$sanitizer'' | | 168 | |
| | | ''private'' | ''(untyped)'' | ''$mediaDao'' | | 176 | |
| |
| ======= Methods (29) ======= | ======= Methods (29) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | Initialize or instanstiate of class propertis | 186 | | | public | ''__construct()'' | Initialize or instanstiate of class propertis | 186 | |
| | public | ''setPageId()'' | set page id | 200 | | | public | ''setPageId()'' | set page id | 200 | |
| | public | ''setPageAuthor()'' | setPageAuthor | 211 | | | public | ''setPageAuthor()'' | setPageAuthor | 211 | |
| | public | ''setPostDate()'' | setPostDate | 222 | | | public | ''setPostDate()'' | setPostDate | 222 | |
| | public | ''setPostModified()'' | setPostModified | 234 | | | public | ''setPostModified()'' | setPostModified | 234 | |
| | public | ''setPageImage()'' | SetPageImage | 245 | | | public | ''setPageImage()'' | SetPageImage | 245 | |
| | public | ''setPageTitle()'' | set page title | 256 | | | public | ''setPageTitle()'' | set page title | 256 | |
| | public | ''setPageSlug()'' | set page slug | 267 | | | public | ''setPageSlug()'' | set page slug | 267 | |
| | public | ''setPageContent()'' | set page content | 278 | | | public | ''setPageContent()'' | set page content | 278 | |
| | public | ''setMetaDesc()'' | set meta description | 289 | | | public | ''setMetaDesc()'' | set meta description | 289 | |
| | public | ''setPublish()'' | set page status | 300 | | | public | ''setPublish()'' | set page status | 300 | |
| | public | ''setPostType()'' | Set post type | 311 | | | public | ''setPostType()'' | Set post type | 311 | |
| | public | ''setSticky()'' | setSticky | 324 | | | public | ''setSticky()'' | setSticky | 324 | |
| | public | ''setComment()'' | setComment | 335 | | | public | ''setComment()'' | setComment | 335 | |
| | public | ''setPageLocale()'' | setPageLocale | 346 | | | public | ''setPageLocale()'' | setPageLocale | 346 | |
| | public | ''grabPages()'' | grabPages | 358 | | | public | ''grabPages()'' | grabPages | 358 | |
| | public | ''grabPage()'' | grabPage | 371 | | | public | ''grabPage()'' | grabPage | 371 | |
| | public | ''addPage()'' | addPage | 380 | | | public | ''addPage()'' | addPage | 380 | |
| | public | ''modifyPage()'' | modifyPage | 419 | | | public | ''modifyPage()'' | modifyPage | 419 | |
| | public | ''removePage()'' | removePage | 457 | | | public | ''removePage()'' | removePage | 457 | |
| | public | ''postStatusDropDown()'' | postStatusDropDown() | 514 | | | public | ''postStatusDropDown()'' | postStatusDropDown() | 514 | |
| | public | ''commentStatusDropDown()'' | commentStatusDropDown() | 526 | | | public | ''commentStatusDropDown()'' | commentStatusDropDown() | 526 | |
| | public | ''localeDropDown()'' | localeDropDown() | 538 | | | public | ''localeDropDown()'' | localeDropDown() | 538 | |
| | public | ''getImageRadioButton()'' | getImageRadioButton() | 553 | | | public | ''getImageRadioButton()'' | getImageRadioButton() | 553 | |
| | public | ''createPageMedia()'' | createPageMedia() | 567 | | | public | ''createPageMedia()'' | createPageMedia() | 567 | |
| | public | ''createPageMediaMeta()'' | createPageMediaMeta() | 581 | | | public | ''createPageMediaMeta()'' | createPageMediaMeta() | 581 | |
| | public | ''pageAuthorId()'' | pageAuthorId | 592 | | | public | ''pageAuthorId()'' | pageAuthorId | 592 | |
| | public | ''pageAuthorLevel()'' | pageAuthorLevel | 608 | | | public | ''pageAuthorLevel()'' | pageAuthorLevel | 608 | |
| | public | ''totalPages()'' | totalPages | 619 | | | public | ''totalPages()'' | totalPages | 619 | |
| |
| |
| Initialize or instanstiate of class propertis | Initialize or instanstiate of class propertis |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$pageDao'' | [[scriptlog:lib:dao:pagedao|''PageDao'']] | //required// | Data access for page records | | | ''$pageDao'' | [[scriptlog:lib:dao:pagedao|''PageDao'']] | //required// | Data access for page records | |
| | ''$validator'' | [[scriptlog:lib:core:formvalidator|''FormValidator'']] | //required// | Input validator | | | ''$validator'' | [[scriptlog:lib:core:formvalidator|''FormValidator'']] | //required// | Input validator | |
| | ''$sanitizer'' | [[scriptlog:lib:core:sanitize|''Sanitize'']] | //required// | Input sanitizer | | | ''$sanitizer'' | [[scriptlog:lib:core:sanitize|''Sanitize'']] | //required// | Input sanitizer | |
| | ''$mediaDao'' | [[scriptlog:lib:dao:mediadao|''MediaDao'']] | //required// | Data access for page media lookups and writes | | | ''$mediaDao'' | [[scriptlog:lib:dao:mediadao|''MediaDao'']] | //required// | Data access for page media lookups and writes | |
| |
| |
| set page id | set page id |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$pageId'' | ''(untyped)'' | //required// | //none// | | | ''$pageId'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| setPageAuthor | setPageAuthor |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$author'' | ''(untyped)'' | //required// | //none// | | | ''$author'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| setPostDate | setPostDate |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$date_created'' | ''(untyped)'' | //required// | //none// | | | ''$date_created'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| setPostModified | setPostModified |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$date_modified'' | ''(untyped)'' | //required// | //none// | | | ''$date_modified'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| SetPageImage | SetPageImage |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$post_image'' | ''(untyped)'' | //required// | //none// | | | ''$post_image'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| set page title | set page title |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$title'' | ''(untyped)'' | //required// | //none// | | | ''$title'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| set page slug | set page slug |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$slug'' | ''(untyped)'' | //required// | //none// | | | ''$slug'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| set page content | set page content |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$content'' | ''(untyped)'' | //required// | //none// | | | ''$content'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| set meta description | set meta description |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$meta_desc'' | ''(untyped)'' | //required// | //none// | | | ''$meta_desc'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| set page status | set page status |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$page_status'' | ''(untyped)'' | //required// | //none// | | | ''$page_status'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set post type | Set post type |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$post_type'' | ''(untyped)'' | //required// | //none// | | | ''$post_type'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| stick to the top of the blog | stick to the top of the blog |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$page_sticky'' | ''(untyped)'' | //required// | //none// | | | ''$page_sticky'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| setComment | setComment |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$comment_status'' | ''(untyped)'' | //required// | //none// | | | ''$comment_status'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| setPageLocale | setPageLocale |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$page_locale'' | ''(untyped)'' | //required// | //none// | | | ''$page_locale'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| grabPages | grabPages |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$type'' | ''(untyped)'' | //required// | //none// | | | ''$type'' | ''(untyped)'' | //required// | //none// | |
| | ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// | | | ''$orderBy'' | ''(untyped)'' | '''ID''' | //none// | |
| | ''$author'' | ''(untyped)'' | ''null'' | //none// | | | ''$author'' | ''(untyped)'' | ''null'' | //none// | |
| |
| **Returns:** ''(none declared)'' — mixed | **Returns:** ''(none declared)'' — mixed |
| grabPage | grabPage |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$id'' | ''(untyped)'' | //required// | //none// | | | ''$id'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — mixed | **Returns:** ''(none declared)'' — mixed |
| select box post status | select box post status |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$selected'' | ''(untyped)'' | ''""'' | //none// | | | ''$selected'' | ''(untyped)'' | ''""'' | //none// | |
| |
| **Returns:** ''(none declared)'' — string | **Returns:** ''(none declared)'' — string |
| commentStatusDropDown() | commentStatusDropDown() |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$selected'' | ''(untyped)'' | ''""'' | //none// | | | ''$selected'' | ''(untyped)'' | ''""'' | //none// | |
| |
| **Returns:** ''(none declared)'' — string | **Returns:** ''(none declared)'' — string |
| localeDropDown() | localeDropDown() |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$selected'' | ''(untyped)'' | ''""'' | //none// | | | ''$selected'' | ''(untyped)'' | ''""'' | //none// | |
| |
| **Returns:** ''(none declared)'' — string | **Returns:** ''(none declared)'' — string |
| so controllers never build a DAO themselves. | so controllers never build a DAO themselves. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$checked'' | ''(untyped)'' | ''null'' | Media ID pre-selected in the list | | | ''$checked'' | ''(untyped)'' | ''null'' | Media ID pre-selected in the list | |
| |
| **Returns:** ''string'' — string HTML radio list | **Returns:** ''string'' — string HTML radio list |
| Persist a page media record through the injected MediaDao. | Persist a page media record through the injected MediaDao. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$bind'' | ''array'' | //required// | Media column values | | | ''$bind'' | ''array'' | //required// | Media column values | |
| |
| **Returns:** ''string'' — string New media ID as returned by the DAO | **Returns:** ''string'' — string New media ID as returned by the DAO |
| Persist a page media meta record through the injected MediaDao. | Persist a page media meta record through the injected MediaDao. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$bind'' | ''array'' | //required// | Media meta column values | | | ''$bind'' | ''array'' | //required// | Media meta column values | |
| |
| **Returns:** ''void'' — void | **Returns:** ''void'' — void |
| totalPages | totalPages |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$data'' | ''array'' | ''[]'' | //none// | | | ''$data'' | ''array'' | ''[]'' | //none// | |
| |
| **Returns:** ''?int'' — integer|null | **Returns:** ''?int'' — integer|null |
| ======= Imports ======= | ======= Imports ======= |
| |
| ^ Alias ^ Fully-qualified name ^ | ^ Alias ^ Fully-qualified name ^ |
| | ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | | | ''FormValidator'' | [[scriptlog:lib:core:formvalidator|''Scriptlog\Core\FormValidator'']] | |
| | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | | | ''Sanitize'' | [[scriptlog:lib:core:sanitize|''Scriptlog\Core\Sanitize'']] | |
| | ''Session'' | [[scriptlog:lib:core:session|''Scriptlog\Core\Session'']] | | | ''Session'' | [[scriptlog:lib:core:session|''Scriptlog\Core\Session'']] | |
| | ''MediaDao'' | [[scriptlog:lib:dao:mediadao|''Scriptlog\Dao\MediaDao'']] | | | ''MediaDao'' | [[scriptlog:lib:dao:mediadao|''Scriptlog\Dao\MediaDao'']] | |
| | ''PageDao'' | [[scriptlog:lib:dao:pagedao|''Scriptlog\Dao\PageDao'']] | | | ''PageDao'' | [[scriptlog:lib:dao:pagedao|''Scriptlog\Dao\PageDao'']] | |
| |
| |