CMS Made Simple API

FilePickerInterface
in

Define an interface for modules that provide filepicker functionality.

Tags
license

GPL

author

Robert Campbell calguy1000@cmsmadesimple.org

since
2.2

Table of Contents

Methods

get_browser_url()  : string
Get the URL required to render the filepicker
get_default_profile()  : FilePickerProfile
Get the default profile for the specified data.
get_html()  : mixed
Generate HTML to display an input field that is initialized with the filepicker plugin.
get_profile_or_default()  : FilePickerProfile
Given a profile name, and other data return a suitable profile by name, or return a default profile

Methods

get_default_profile()

Get the default profile for the specified data.

public get_default_profile([string $dir = null ][, int $uid = null ]) : FilePickerProfile
Parameters
$dir : string = null

A suitable top location

$uid : int = null

An optional admin user id.

Return values
FilePickerProfile

get_html()

Generate HTML to display an input field that is initialized with the filepicker plugin.

public get_html(string $name, string $value, FilePickerProfile $profile) : mixed
Parameters
$name : string

The name for the input field.

$value : string

the current value for the input filed

$profile : FilePickerProfile

The profile to use when building the filepicker interface.

get_profile_or_default()

Given a profile name, and other data return a suitable profile by name, or return a default profile

public get_profile_or_default(string $profile_name[, string $dir = null ][, int $uid = null ]) : FilePickerProfile
Parameters
$profile_name : string

the desired profile name to load

$dir : string = null

A suitable top location

$uid : int = null

An optional admin user id.

Return values
FilePickerProfile

        
On this page

Search results