multiplelayouts
Table of Contents
Classes
- multipleLayoutOptions
- Plugin option handling class
Functions
- getSelectedLayout() : string|false
- Gets the selected layout page for this item. Returns false if nothing is selected.
- checkParentLayouts() : array<string|int, mixed>|false
- Checks if there is a layout inherited from a parent items (album, page or category) and returns it. Returns false otherwise.
- checkLayoutUseForImages() : array<string|int, mixed>|false
- Gets the selected layout page for images if the album option to use the equivalent of their album layout is seleted.
- layoutSelector() : string
- returns the layout selector for an object.
- layoutSelector_album() : string
- returns the layout selectors for an album.
- getLayoutSelector() : string
- Worker function for creating layout selectors. Returns the HTML
- getLayout() : string
- Gets the select layout page and returns it to the load_theme_script filter
- saveLayoutSelection() : string
- Saves the layout page assignment via filter on the backend
- saveZenphotoLayoutSelection() : string
- Saves the layout page assignment via filter on the backend for images and albums
- deleteLayoutSelection() : bool
- processes object removals if they have been assigned layouts
- copyLayoutSelection() : mixed
- Copies the layout selection
Functions
getSelectedLayout()
Gets the selected layout page for this item. Returns false if nothing is selected.
getSelectedLayout(object $obj, string $type) : string|false
Parameters
- $obj : object
-
the object being selected
- $type : string
-
For Zenphoto gallery items "multiple_layouts_albums", 'multiple_layouts_albums_images', 'multiple_layouts_images' For Zenpage CMS items , "multiple_layouts_pages", , "multiple_layouts_news" , "multiple_layouts_news_categories"
Return values
string|falsecheckParentLayouts()
Checks if there is a layout inherited from a parent items (album, page or category) and returns it. Returns false otherwise.
checkParentLayouts(object $obj, string $type) : array<string|int, mixed>|false
Parameters
- $obj : object
-
the object being selected
- $type : string
-
For Zenphoto gallery items "multiple_layouts_albums", 'multiple_layouts_albums_images', 'multiple_layouts_images' For Zenpage CMS items , "multiple_layouts_pages", , "multiple_layouts_news" , "multiple_layouts_news_categories"
Return values
array<string|int, mixed>|falsecheckLayoutUseForImages()
Gets the selected layout page for images if the album option to use the equivalent of their album layout is seleted.
checkLayoutUseForImages(object $obj) : array<string|int, mixed>|false
Parameters
- $obj : object
-
the album
Return values
array<string|int, mixed>|falselayoutSelector()
returns the layout selector for an object.
layoutSelector(mixed $html, object $obj[, mixed $prefix = '' ]) : string
Parameters
- $html : mixed
- $obj : object
- $prefix : mixed = ''
Return values
stringlayoutSelector_album()
returns the layout selectors for an album.
layoutSelector_album(mixed $html, object $obj[, mixed $prefix = '' ]) : string
Parameters
- $html : mixed
- $obj : object
- $prefix : mixed = ''
Tags
Return values
stringgetLayoutSelector()
Worker function for creating layout selectors. Returns the HTML
getLayoutSelector(object $obj, string $type, string $text[, string $prefix = '' ][, bool $secondary = false ]) : string
Parameters
- $obj : object
- $type : string
- $text : string
- $prefix : string = ''
-
Default empty
- $secondary : bool = false
-
Default false
Return values
stringgetLayout()
Gets the select layout page and returns it to the load_theme_script filter
getLayout(string $path) : string
Parameters
- $path : string
-
Path of the layout file
Return values
stringsaveLayoutSelection()
Saves the layout page assignment via filter on the backend
saveLayoutSelection(string $message, object $obj) : string
Parameters
- $message : string
-
Message (not used)
- $obj : object
-
Object of the item to assign the layout
Return values
stringsaveZenphotoLayoutSelection()
Saves the layout page assignment via filter on the backend for images and albums
saveZenphotoLayoutSelection(object $obj, string $prefix) : string
Parameters
- $obj : object
-
Object of the item to assign the layout
- $prefix : string
Return values
stringdeleteLayoutSelection()
processes object removals if they have been assigned layouts
deleteLayoutSelection(bool $allow, object $obj) : bool
Parameters
- $allow : bool
-
we just return this since we have no need to abort the remove
- $obj : object
-
the object being removed
Return values
boolcopyLayoutSelection()
Copies the layout selection
copyLayoutSelection(int $newid, obj $obj) : mixed
Parameters
- $newid : int
-
ID of the item to copy to
- $obj : obj
-
Object of the original item return int