CommonFolderTrait uses trait:short
Trait common folder meta helper methods.
Tags
Table of Contents
Methods
- is() : bool
- Gets (and persists) a checkbox to the folder metadata.
- hardReloadAfterSaveIfBodyHasClass() : mixed
- Reload the current document if the `body` has a given class. This allows you e.g. to only reload in Media Library view instead of while editing a post.
- reloadAfterSave() : mixed
- Reload the current selected folder after the metadata is successfully saved.
Methods
is()
Gets (and persists) a checkbox to the folder metadata.
protected
static is(string $meta, IFolder $folder[, bool $persist = null ]) : bool
Parameters
- $meta : string
-
The meta key
- $folder : IFolder
-
The folder
- $persist : bool = null
-
If set it will be updated or deleted
Return values
boolhardReloadAfterSaveIfBodyHasClass()
Reload the current document if the `body` has a given class. This allows you e.g. to only reload in Media Library view instead of while editing a post.
private
hardReloadAfterSaveIfBodyHasClass(array<string|int, string> &$response, string $class) : mixed
Parameters
- $response : array<string|int, string>
- $class : string
reloadAfterSave()
Reload the current selected folder after the metadata is successfully saved.
private
reloadAfterSave(array<string|int, string> &$response) : mixed
Parameters
- $response : array<string|int, string>