| Next revision | Previous revision |
| scriptlog:lib:service:themeservice [2026/09/26 09:09] – admin admin | scriptlog:lib:service:themeservice [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Class ThemeService | | | ''@category'' | Class ThemeService | |
| | ''@author'' | M.Noermoehammad | | | ''@author'' | M.Noermoehammad | |
| | ''@license'' | MIT | | | ''@license'' | MIT | |
| | ''@version'' | 1.0.0 | | | ''@version'' | 1.0.0 | |
| | ''@since'' | Since Release 1.0.0 | | | ''@since'' | Since Release 1.0.0 | |
| |
| ======= Inheritance ======= | ======= Inheritance ======= |
| //None.// | //None.// |
| |
| ======= Properties (0) ======= | ======= Properties (10) ======= |
| |
| //None declared.// | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | | ''private'' | ''(untyped)'' | ''$theme_id'' | | 30 | |
| | | ''private'' | ''(untyped)'' | ''$theme_title'' | | 37 | |
| | | ''private'' | ''(untyped)'' | ''$theme_description'' | | 44 | |
| | | ''private'' | ''(untyped)'' | ''$theme_designer'' | | 51 | |
| | | ''private'' | ''(untyped)'' | ''$theme_directory'' | | 58 | |
| | | ''private'' | ''(untyped)'' | ''$theme_status'' | | 65 | |
| | | ''private'' | ''(untyped)'' | ''$themeDao'' | | 72 | |
| | | ''private'' | ''(untyped)'' | ''$validator'' | | 79 | |
| | | ''private'' | ''(untyped)'' | ''$sanitize'' | | 82 | |
| | | ''private'' | ''(untyped)'' | ''$licenseService'' | | 85 | |
| |
| ======= Methods (18) ======= | ======= Methods (18) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | Constructor | 94 | | | public | ''__construct()'' | Constructor | 94 | |
| | public | ''setThemeId()'' | Set Theme ID | 107 | | | public | ''setThemeId()'' | Set Theme ID | 107 | |
| | public | ''setThemeTitle()'' | Set Theme Title | 117 | | | public | ''setThemeTitle()'' | Set Theme Title | 117 | |
| | public | ''setThemeDescription()'' | Set Theme Description | 127 | | | public | ''setThemeDescription()'' | Set Theme Description | 127 | |
| | public | ''setThemeDesigner()'' | Set Theme Designer | 137 | | | public | ''setThemeDesigner()'' | Set Theme Designer | 137 | |
| | public | ''setThemeDirectory()'' | Set Theme Directory | 147 | | | public | ''setThemeDirectory()'' | Set Theme Directory | 147 | |
| | public | ''setThemeStatus()'' | Set Theme Status | 157 | | | public | ''setThemeStatus()'' | Set Theme Status | 157 | |
| | public | ''grabThemes()'' | Retrieve themes | 168 | | | public | ''grabThemes()'' | Retrieve themes | 168 | |
| | public | ''grabTheme()'' | Retrieve a single theme | 179 | | | public | ''grabTheme()'' | Retrieve a single theme | 179 | |
| | public | ''addTheme()'' | Add a new theme | 188 | | | public | ''addTheme()'' | Add a new theme | 188 | |
| | public | ''modifyTheme()'' | Modify an existing theme | 206 | | | public | ''modifyTheme()'' | Modify an existing theme | 206 | |
| | public | ''activateInstalledTheme()'' | Activate an installed theme | 235 | | | public | ''activateInstalledTheme()'' | Activate an installed theme | 235 | |
| | public | ''activateInstalledThemeWithLicense()'' | Activate an installed theme, validating the license key first. | 251 | | | public | ''activateInstalledThemeWithLicense()'' | Activate an installed theme, validating the license key first. | 251 | |
| | public | ''deactivateInstalledTheme()'' | Deactivate an installed theme | 360 | | | public | ''deactivateInstalledTheme()'' | Deactivate an installed theme | 360 | |
| | private | ''deactivateThemeLicense()'' | Notify the MyBlog license server that a premium theme is being | 384 | | | private | ''deactivateThemeLicense()'' | Notify the MyBlog license server that a premium theme is being | 384 | |
| | public | ''removeTheme()'' | Remove a theme | 427 | | | public | ''removeTheme()'' | Remove a theme | 427 | |
| | public | ''isThemeExists()'' | isThemeExists | 452 | | | public | ''isThemeExists()'' | isThemeExists | 452 | |
| | public | ''totalThemes()'' | totalThemes | 463 | | | public | ''totalThemes()'' | totalThemes | 463 | |
| |
| |
| Constructor | Constructor |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$themeDao'' | [[scriptlog:lib:dao:themedao|''ThemeDao'']] | //required// | //none// | | | ''$themeDao'' | [[scriptlog:lib:dao:themedao|''ThemeDao'']] | //required// | //none// | |
| | ''$validator'' | [[scriptlog:lib:core:formvalidator|''FormValidator'']] | //required// | //none// | | | ''$validator'' | [[scriptlog:lib:core:formvalidator|''FormValidator'']] | //required// | //none// | |
| | ''$sanitize'' | [[scriptlog:lib:core:sanitize|''Sanitize'']] | //required// | //none// | | | ''$sanitize'' | [[scriptlog:lib:core:sanitize|''Sanitize'']] | //required// | //none// | |
| |
| |
| Set Theme ID | Set Theme ID |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_id'' | ''(untyped)'' | //required// | //none// | | | ''$theme_id'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set Theme Title | Set Theme Title |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_title'' | ''(untyped)'' | //required// | //none// | | | ''$theme_title'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set Theme Description | Set Theme Description |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_description'' | ''(untyped)'' | //required// | //none// | | | ''$theme_description'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set Theme Designer | Set Theme Designer |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_designer'' | ''(untyped)'' | //required// | //none// | | | ''$theme_designer'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set Theme Directory | Set Theme Directory |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_directory'' | ''(untyped)'' | //required// | //none// | | | ''$theme_directory'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Set Theme Status | Set Theme Status |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_status'' | ''(untyped)'' | //required// | //none// | | | ''$theme_status'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' | **Returns:** ''(none declared)'' |
| Retrieve themes | Retrieve themes |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$orderBy'' | ''(untyped)'' | '''ID''' | Column to order by | | | ''$orderBy'' | ''(untyped)'' | '''ID''' | Column to order by | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Retrieve a single theme | Retrieve a single theme |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$id'' | ''(untyped)'' | //required// | //none// | | | ''$id'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| the MyBlog license API before activation is allowed. | the MyBlog license API before activation is allowed. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$licenseKey'' | ''(untyped)'' | ''null'' | //none// | | | ''$licenseKey'' | ''(untyped)'' | ''null'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array{success: bool, message: string} | **Returns:** ''(none declared)'' — array{success: bool, message: string} |
| license key and product identifier trigger a remote call. | license key and product identifier trigger a remote call. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme'' | ''(untyped)'' | //required// | //none// | | | ''$theme'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — void | **Returns:** ''(none declared)'' — void |
| isThemeExists | isThemeExists |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$theme_title'' | ''(untyped)'' | //required// | //none// | | | ''$theme_title'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — boolean | **Returns:** ''(none declared)'' — boolean |
| totalThemes | totalThemes |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$data'' | ''array'' | ''[]'' | //none// | | | ''$data'' | ''array'' | ''[]'' | //none// | |
| |
| **Returns:** ''?int'' — integer|numeric|null | **Returns:** ''?int'' — integer|numeric|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'']] | |
| | ''ThemeDao'' | [[scriptlog:lib:dao:themedao|''Scriptlog\Dao\ThemeDao'']] | | | ''ThemeDao'' | [[scriptlog:lib:dao:themedao|''Scriptlog\Dao\ThemeDao'']] | |
| | ''ThemeLicenseService'' | [[scriptlog:lib:service:themelicenseservice|''Scriptlog\Service\ThemeLicenseService'']] | | | ''ThemeLicenseService'' | [[scriptlog:lib:service:themelicenseservice|''Scriptlog\Service\ThemeLicenseService'']] | |
| |
| |