| Next revision | Previous revision |
| scriptlog:lib:core:sidebarviewmodel [2026/09/26 09:09] – admin admin | scriptlog:lib:core:sidebarviewmodel [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Theme | | | ''@category'' | Theme | |
| | ''@author'' | M.Noermoehammad | | | ''@author'' | M.Noermoehammad | |
| | ''@license'' | MIT | | | ''@license'' | MIT | |
| | ''@version'' | 1.0 | | | ''@version'' | 1.0 | |
| |
| ======= Inheritance ======= | ======= Inheritance ======= |
| |
| ^ Relation ^ Type ^ Meaning ^ | ^ Relation ^ Type ^ Meaning ^ |
| | extends | [[scriptlog:lib:core:abstractthemeviewmodel|''AbstractThemeViewModel'']] | parent class/interface | | | extends | [[scriptlog:lib:core:abstractthemeviewmodel|''AbstractThemeViewModel'']] | parent class/interface | |
| |
| ======= Constants (0) ======= | ======= Constants (0) ======= |
| ======= Properties (4) ======= | ======= Properties (4) ======= |
| |
| ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | ''private'' | ''(untyped)'' | ''$latestPosts'' | ''[];'' | 22 | | | ''private'' | ''(untyped)'' | ''$latestPosts'' | ''[]'' | 22 | |
| | ''private'' | ''(untyped)'' | ''$categories'' | ''[];'' | 25 | | | ''private'' | ''(untyped)'' | ''$categories'' | ''[]'' | 25 | |
| | ''private'' | ''(untyped)'' | ''$archives'' | ''[];'' | 28 | | | ''private'' | ''(untyped)'' | ''$archives'' | ''[]'' | 28 | |
| | ''private'' | ''(untyped)'' | ''$tags'' | ''[];'' | 31 | | | ''private'' | ''(untyped)'' | ''$tags'' | ''[]'' | 31 | |
| |
| ======= Methods (7) ======= | ======= Methods (7) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public static | ''fromRow()'' | Build a sidebar view model. | 40 | | | public static | ''fromRow()'' | Build a sidebar view model. | 40 | |
| | public static | ''fromPrepared()'' | Build a sidebar view model from already-prepared, already-safe values. | 99 | | | public static | ''fromPrepared()'' | Build a sidebar view model from already-prepared, already-safe values. | 99 | |
| | public | ''latestPosts()'' | PostViewModel[] | 132 | | | public | ''latestPosts()'' | PostViewModel[] | 132 | |
| | public | ''categories()'' | array<int, array{title:string|null,url:string,count:string|null}> | 143 | | | public | ''categories()'' | array<int, array{title:string|null,url:string,count:string|null}> | 143 | |
| | public | ''archives()'' | array<int, array{label:string|null,url:string,count:string|null}> | 154 | | | public | ''archives()'' | array<int, array{label:string|null,url:string,count:string|null}> | 154 | |
| | public | ''tags()'' | array<int, array{label:string|null,url:string}> | 165 | | | public | ''tags()'' | array<int, array{label:string|null,url:string}> | 165 | |
| | public | ''searchAction()'' | | 174 | | | public | ''searchAction()'' | | 174 | |
| |
| |
| Build a sidebar view model. | Build a sidebar view model. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$row'' | ''array'' | //required// | //none// | | | ''$row'' | ''array'' | //required// | //none// | |
| | ''$escape'' | ''callable'' | //required// | //none// | | | ''$escape'' | ''callable'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — static | **Returns:** ''(none declared)'' — static |
| verbatim. latest_posts must be an array of PostViewModel instances. | verbatim. latest_posts must be an array of PostViewModel instances. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$prepared'' | ''array'' | //required// | //none// | | | ''$prepared'' | ''array'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — static | **Returns:** ''(none declared)'' — static |