PHP Class Craft\EmbeddedAssetsPlugin

Thank you for using Craft Embedded Assets!
See also: https://github.com/benjamminf/craft-embedded-assets
Inheritance: extends craft\BasePlugin
Mostra file Open project: benjamminf/craft-embedded-assets

Public Methods

Method Description
defineAdditionalAssetTableAttributes ( ) : array Hook for adding additional table attributes to the Assets manager.
getAssetTableAttributeHtml ( $element, $attribute ) : null | string Hook for formatting the HTML for embedded asset attributes in the Assets manager.
getCacheKey ( ) : string
getCraftMinimumVersion ( )
getDescription ( )
getDeveloper ( )
getDeveloperUrl ( )
getDocumentationUrl ( )
getFileNamePrefix ( ) : mixed Shorthand for getting the file name prefix setting.
getName ( )
getPHPMinimumVersion ( )
getParameters ( ) : mixed Shorthand for getting the parameters setting.
getReleaseFeedUrl ( )
getSchemaVersion ( )
getSettingsHtml ( ) : mixed Renders the plugin's settings page.
getVersion ( )
getWhitelist ( ) : mixed Shorthand for getting the whitelist setting.
init ( ) Initialise the plugin by loading dependencies and resources.
isCompatible ( ) : boolean Returns if the plugin is compatible with the current system stack.
isCraftRequiredVersion ( ) : boolean Defines the earliest version of Craft that this plugin is compatible with.
isPHPRequiredVersion ( ) : boolean Defines the earliest version of PHP that this plugin is compatible with.
loadDependencies ( ) Loads all dependencies for this plugin.
onBeforeInstall ( ) : boolean Checks if the plugin is compatible before installation.
prepSettings ( array $postSettings ) : array Formats values from the CP settings form to be saved into the DB.

Protected Methods

Method Description
defineSettings ( ) : array The default settings for the plugin.
includeResources ( ) Loads all CSS and JS resources for the plugin.

Private Methods

Method Description
_getThumbnails ( ) : array Returns an array of all embedded assets thumbnails, indexed by the asset file models ID.

Method Details

defineAdditionalAssetTableAttributes() public method

Adds a provider attribute for embedded assets to display their providers.

defineSettings() protected method

The default settings for the plugin.
protected defineSettings ( ) : array
return array

getAssetTableAttributeHtml() public method

Hook for formatting the HTML for embedded asset attributes in the Assets manager.
public getAssetTableAttributeHtml ( $element, $attribute ) : null | string
$element
$attribute
return null | string

getCacheKey() public static method

public static getCacheKey ( ) : string
return string

getCraftMinimumVersion() public method

getDescription() public method

public getDescription ( )

getDeveloper() public method

public getDeveloper ( )

getDeveloperUrl() public method

public getDeveloperUrl ( )

getDocumentationUrl() public method

public getDocumentationUrl ( )

getFileNamePrefix() public static method

Shorthand for getting the file name prefix setting.
public static getFileNamePrefix ( ) : mixed
return mixed

getName() public method

public getName ( )

getPHPMinimumVersion() public method

getParameters() public static method

Shorthand for getting the parameters setting.
public static getParameters ( ) : mixed
return mixed

getReleaseFeedUrl() public method

public getReleaseFeedUrl ( )

getSchemaVersion() public method

public getSchemaVersion ( )

getSettingsHtml() public method

Renders the plugin's settings page.
public getSettingsHtml ( ) : mixed
return mixed

getVersion() public method

public getVersion ( )

getWhitelist() public static method

Shorthand for getting the whitelist setting.
public static getWhitelist ( ) : mixed
return mixed

includeResources() protected method

Loads all CSS and JS resources for the plugin.
protected includeResources ( )

init() public method

Initialise the plugin by loading dependencies and resources.
public init ( )

isCompatible() public method

Returns if the plugin is compatible with the current system stack.
public isCompatible ( ) : boolean
return boolean

isCraftRequiredVersion() public method

Defines the earliest version of Craft that this plugin is compatible with.
public isCraftRequiredVersion ( ) : boolean
return boolean - Whether the current installed version of Craft is compatible

isPHPRequiredVersion() public method

Defines the earliest version of PHP that this plugin is compatible with.
public isPHPRequiredVersion ( ) : boolean
return boolean - Whether the current version of PHP is compatible

loadDependencies() public static method

The plugin currently depends on the Essence library.
See also: https://github.com/essence/essence
public static loadDependencies ( )

onBeforeInstall() public method

Checks if the plugin is compatible before installation.
public onBeforeInstall ( ) : boolean
return boolean

prepSettings() public method

Formats values from the CP settings form to be saved into the DB.
public prepSettings ( array $postSettings ) : array
$postSettings array
return array