View
in package
Uses
UtilsProvider
Handles the view for dropdowns and custom UI's for folders.
Table of Contents
Properties
- $namesSlugArrayCache : mixed
- $structure : mixed
Methods
- __construct() : mixed
- C'tor.
- dropdown() : string
- Create dropdown from the current users tree.
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- getStructure() : Structure
- Getter.
- namesSlugArray() : mixed
- Get array for the javascript backbone view.
- optionsSelected() : mixed
- selector() : mixed
- namesSlugArrayRec() : mixed
- optionsHTML() : mixed
- Gets a HTML formatted string for <option>.
Properties
$namesSlugArrayCache
private
mixed
$namesSlugArrayCache
= null
$structure
private
mixed
$structure
Methods
__construct()
C'tor.
public
__construct(Structure $structure) : mixed
Parameters
- $structure : Structure
dropdown()
Create dropdown from the current users tree.
public
dropdown(int $selected, bool $disabled[, bool $useAll = true ]) : string
Parameters
- $selected : int
- $disabled : bool
- $useAll : bool = true
Return values
string —HTML
getPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringgetStructure()
Getter.
public
getStructure() : Structure
Return values
StructurenamesSlugArray()
Get array for the javascript backbone view.
public
namesSlugArray([array<string|int, object> $tree = null ][, string $spaces = '--' ][, bool $forceReload = false ]) : mixed
The private namesSlugArray is for caching purposes and can be reset with the given function.
Parameters
- $tree : array<string|int, object> = null
- $spaces : string = '--'
- $forceReload : bool = false
optionsSelected()
public
optionsSelected(mixed $selected, mixed $value) : mixed
Parameters
- $selected : mixed
- $value : mixed
selector()
public
selector(mixed $options) : mixed
Parameters
- $options : mixed
namesSlugArrayRec()
private
namesSlugArrayRec([mixed $tree = null ][, mixed $spaces = '--' ]) : mixed
Parameters
- $tree : mixed = null
- $spaces : mixed = '--'
optionsHTML()
Gets a HTML formatted string for <option>.
private
optionsHTML([int $selected = -1 ][, array<string|int, object> $tree = null ][, string $slashed = '' ][, string $spaces = ' ' ][, bool $useAll = true ][, bool $disabled = null ]) : mixed
Parameters
- $selected : int = -1
- $tree : array<string|int, object> = null
- $slashed : string = ''
- $spaces : string = ' '
- $useAll : bool = true
- $disabled : bool = null