Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:core:menuviewmodel

Differences

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

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:core:menuviewmodel [2026/09/26 09:09] – admin adminscriptlog:lib:core:menuviewmodel [2026/09/26 09:34] (current) – admin admin
Line 16: Line 16:
 ======= 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) =======
Line 33: Line 33:
 ======= Properties (1) ======= ======= Properties (1) =======
  
-  ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ +^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
-  | ''private'' | ''(untyped)'' | ''$children'' | ''[];'' | 22 |+| ''private'' | ''(untyped)'' | ''$children'' | ''[]'' | 22 |
  
 ======= Methods (10) ======= ======= Methods (10) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public static | ''fromRow()'' | Build a menu view model from a row. | 31 | +| public static | ''fromRow()'' | Build a menu view model from a row. | 31 | 
-  | public static | ''fromPrepared()'' | Build a menu view model from already-prepared, already-safe values. | 59 | +| public static | ''fromPrepared()'' | Build a menu view model from already-prepared, already-safe values. | 59 | 
-  | public | ''setChildren()'' | Attach child menu items (recursive tree). | 83 | +| public | ''setChildren()'' | Attach child menu items (recursive tree). | 83 | 
-  | public | ''id()'' | @psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes | 89 | +| public | ''id()'' |  | 89 | 
-  | public | ''label()'' | @psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes | 94 | +| public | ''label()'' |  | 94 | 
-  | public | ''url()'' | @psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes | 99 | +| public | ''url()'' |  | 99 | 
-  | public | ''parent()'' | @psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes | 104 | +| public | ''parent()'' |  | 104 | 
-  | public | ''visibility()'' | @psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes | 109 | +| public | ''visibility()'' |  | 109 | 
-  | public | ''children()'' | MenuViewModel[] | 120 | +| public | ''children()'' | MenuViewModel[] | 120 | 
-  | public | ''hasChildren()'' | bool Whether the item has child items | 131 |+| public | ''hasChildren()'' | bool Whether the item has child items | 131 |
  
  
Line 61: Line 61:
 Build a menu view model from a row. Build a menu view model from a row.
  
-  ^ 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
Line 82: Line 82:
 stored verbatim. Children are attached afterwards via setChildren(). stored verbatim. Children are attached afterwards via setChildren().
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$prepared'' | ''array'' | //required// | //none// |+|  ''$prepared'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — static **Returns:** ''(none declared)'' — static
Line 98: Line 98:
 Attach child menu items (recursive tree). Attach child menu items (recursive tree).
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$children'' | ''array'' | //required// | //none// |+|  ''$children'' |  ''array'' |  //required// |  //none// |
  
 **Returns:** ''void'' — void **Returns:** ''void'' — void
Line 111: Line 111:
  
 //lines 89–92 (4)// //lines 89–92 (4)//
- 
-@psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes 
  
 //Takes no parameters.// //Takes no parameters.//
Line 126: Line 124:
  
 //lines 94–97 (4)// //lines 94–97 (4)//
- 
-@psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes 
  
 //Takes no parameters.// //Takes no parameters.//
Line 141: Line 137:
  
 //lines 99–102 (4)// //lines 99–102 (4)//
- 
-@psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes 
  
 //Takes no parameters.// //Takes no parameters.//
Line 156: Line 150:
  
 //lines 104–107 (4)// //lines 104–107 (4)//
- 
-@psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes 
  
 //Takes no parameters.// //Takes no parameters.//
Line 171: Line 163:
  
 //lines 109–112 (4)// //lines 109–112 (4)//
- 
-@psalm-suppress PossiblyUnusedMethod -- public getter consumed by public/themes 
  
 //Takes no parameters.// //Takes no parameters.//
scriptlog/lib/core/menuviewmodel.1790413762.txt.gz · Last modified: by admin