PHP Class Xpressengine\Editor\AbstractTool

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Plugin\ComponentInterface, implements JsonSerializable, use trait Xpressengine\Plugin\ComponentTrait
Show file Open project: xpressengine/xpressengine

Protected Properties

Property Type Description
$instanceId string Instance identifier

Public Methods

Method Description
__construct ( string $instanceId ) AbstractTool constructor.
compile ( string $content ) : string Compile the raw content to be useful
enable ( ) : boolean Indicates if usable the tool
getIcon ( ) : array Get the tool's symbol
getInstanceSettingURI ( string $instanceId ) : string | null Get uri string for tool setting by instance identifier
getOptions ( ) : array Get options for the tool
initAssets ( ) : void Initialize assets for the tool
jsonSerialize ( ) : mixed Convert the object into something JSON serializable.

Method Details

__construct() public method

AbstractTool constructor.
public __construct ( string $instanceId )
$instanceId string Instance identifier

compile() abstract public method

Compile the raw content to be useful
abstract public compile ( string $content ) : string
$content string content
return string

enable() public method

Indicates if usable the tool
public enable ( ) : boolean
return boolean

getIcon() abstract public method

Get the tool's symbol
abstract public getIcon ( ) : array
return array ['normal' => '...', 'large' => '...']

getInstanceSettingURI() public static method

Get uri string for tool setting by instance identifier
public static getInstanceSettingURI ( string $instanceId ) : string | null
$instanceId string instance identifier
return string | null

getOptions() public method

Get options for the tool
public getOptions ( ) : array
return array

initAssets() abstract public method

Initialize assets for the tool
abstract public initAssets ( ) : void
return void

jsonSerialize() public method

Convert the object into something JSON serializable.
public jsonSerialize ( ) : mixed
return mixed data which can be serialized by json_encode

Property Details

$instanceId protected property

Instance identifier
protected string $instanceId
return string