PHP Класс Xpressengine\Editor\AbstractEditor

Автор: XE Developers ([email protected])
Наследование: implements Xpressengine\Plugin\ComponentInterface, use trait Xpressengine\Plugin\ComponentTrait, use trait Xpressengine\Support\MobileSupportTrait
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$arguments array Given arguments for the editor
$config Xpressengine\Config\ConfigEntity | null ConfigEntity instance
$defaultArguments array Default editor arguments
$editors EditorHandler EditorHandler instance
$events Illuminate\Contracts\Events\Dispatcher Dispatcher instance
$fileClassName string The file class name
$fileIdentifierAttrName string The file identifier attribute name
$fileInputName string The file input name
$files array Used files
$frontend Xpressengine\Presenter\Html\FrontendHandler FrontendHandler instance
$gate Illuminate\Contracts\Auth\Access\Gate Gate instance
$imageClassName string The image class name
$imageIdentifierAttrName string The image identifier attribute name
$imageResolver callable The image resolver
$instanceId string Instance identifier
$mentionClassName string The mention class name
$mentionIdentifierAttrName string The mention identifier attribute name
$mentionInputName string The mention input name
$options null Options for the editor
$scriptOnly boolean Indicates if used only javascript.
$skins Xpressengine\Skin\SkinHandler SkinHandler instance
$tagClassName string The tag class name
$tagInputName string The tag input name
$tools AbstractTool[] The registered tools for the editor
$urls Illuminate\Contracts\Routing\UrlGenerator UrlGenerator instance

Открытые методы

Метод Описание
__construct ( EditorHandler $editors, Illuminate\Contracts\Routing\UrlGenerator $urls, Illuminate\Contracts\Auth\Access\Gate $gate, Xpressengine\Skin\SkinHandler $skins, Illuminate\Contracts\Events\Dispatcher $events, FrontendHandler $frontend, string $instanceId ) AbstractEditor constructor.
compile ( string $content, boolean $htmlable = false ) : string Compile the raw content to be useful
getActivateToolIds ( ) : array Get activated tool's identifier for the editor
getArguments ( ) : array Get arguments for the editor
getConfig ( ) : null | ConfigEntity Get config for the editor
getCustomOptions ( ) : array Get options for some editor only
getFileClassName ( ) : string Get the file class name
getFileIdentifierAttrName ( ) : string Get the file identifier attribute name
getFileInputName ( ) : string Get the file input name
getImageClassName ( ) : string Get the image class name
getImageIdentifierAttrName ( ) : string Get the image identifier attribute name
getInstanceId ( ) : string Get instance id for the editor
getInstanceSettingURI ( string $instanceId ) : string | null Get uri for custom setting
getMentionClassName ( ) : string Get the mention class name
getMentionIdentifierAttrName ( ) : string Get the mention identifier attribute name
getMentionInputName ( ) : string Get the mention input name
getName ( ) : string Get a editor name
getOptions ( ) : array Get options
getTagClassName ( ) : string Get the tag class name
getTagInputName ( ) : string Get the tag input name
getTools ( ) : AbstractTool[] Get activated tools for the editor
htmlable ( ) : boolean Determine if a editor html usable.
render ( ) : string Get the evaluated contents of the object.
resolveImage ( array $ids = [] ) : array Resolve image instances
setArguments ( array $arguments = [] ) Set arguments for the editor
setConfig ( ConfigEntity $config ) Set config for the editor
setFiles ( array $files = [] ) : void Set files the editor used
setImageResolver ( callable $resolver ) : void Set the image resolver

Защищенные методы

Метод Описание
buildOptions ( ) : array Build options
compileBody ( string $content ) : string Compile content body
getContentDomHtmlOption ( array $domOptions ) : string Get attributes string for content html tag
getContentHtml ( ) : string Get a content html tag string
getDynamicOption ( ) : array Get dynamic option data for the editor
getEditorScript ( array $options ) : mixed Get script for running the editor
getStaticOption ( ) : array Get static option data for the editor
hashTag ( string $content ) : string Compile tags in content body
image ( string $content ) : string Compile images in content body
link ( string $content ) : string Compile links in content body
loadTools ( ) : void Load tools
mention ( string $content ) : string Compile mentions in content body

Приватные методы

Метод Описание
createCrawler ( string $content ) : Crawler Create crawler instance
getData ( string $content, string $selector, array $attributes = [] ) : array Get html node data

Описание методов

__construct() публичный Метод

AbstractEditor constructor.
public __construct ( EditorHandler $editors, Illuminate\Contracts\Routing\UrlGenerator $urls, Illuminate\Contracts\Auth\Access\Gate $gate, Xpressengine\Skin\SkinHandler $skins, Illuminate\Contracts\Events\Dispatcher $events, FrontendHandler $frontend, string $instanceId )
$editors EditorHandler EditorHandler instance
$urls Illuminate\Contracts\Routing\UrlGenerator UrlGenerator instance
$gate Illuminate\Contracts\Auth\Access\Gate Gate instance
$skins Xpressengine\Skin\SkinHandler SkinHandler instance
$events Illuminate\Contracts\Events\Dispatcher Dispatcher instance
$frontend Xpressengine\Presenter\Html\FrontendHandler FrontendHandler instance
$instanceId string Instance identifier

buildOptions() защищенный Метод

Build options
protected buildOptions ( ) : array
Результат array

compile() публичный Метод

Compile the raw content to be useful
public compile ( string $content, boolean $htmlable = false ) : string
$content string content
$htmlable boolean content is htmlable
Результат string

compileBody() абстрактный защищенный Метод

Compile content body
abstract protected compileBody ( string $content ) : string
$content string content
Результат string

getActivateToolIds() публичный Метод

Get activated tool's identifier for the editor
public getActivateToolIds ( ) : array
Результат array

getArguments() публичный Метод

Get arguments for the editor
public getArguments ( ) : array
Результат array

getConfig() публичный Метод

Get config for the editor
public getConfig ( ) : null | ConfigEntity
Результат null | Xpressengine\Config\ConfigEntity

getContentDomHtmlOption() защищенный Метод

Get attributes string for content html tag
protected getContentDomHtmlOption ( array $domOptions ) : string
$domOptions array dom options
Результат string

getContentHtml() защищенный Метод

Get a content html tag string
protected getContentHtml ( ) : string
Результат string

getCustomOptions() публичный Метод

Get options for some editor only
public getCustomOptions ( ) : array
Результат array

getDynamicOption() защищенный Метод

Get dynamic option data for the editor
protected getDynamicOption ( ) : array
Результат array

getEditorScript() защищенный Метод

Get script for running the editor
protected getEditorScript ( array $options ) : mixed
$options array options
Результат mixed

getFileClassName() публичный Метод

Get the file class name
public getFileClassName ( ) : string
Результат string

getFileIdentifierAttrName() публичный Метод

Get the file identifier attribute name
public getFileIdentifierAttrName ( ) : string
Результат string

getFileInputName() публичный Метод

Get the file input name
public getFileInputName ( ) : string
Результат string

getImageClassName() публичный Метод

Get the image class name
public getImageClassName ( ) : string
Результат string

getImageIdentifierAttrName() публичный Метод

Get the image identifier attribute name
public getImageIdentifierAttrName ( ) : string
Результат string

getInstanceId() публичный Метод

Get instance id for the editor
public getInstanceId ( ) : string
Результат string

getInstanceSettingURI() публичный статический Метод

Get uri for custom setting
public static getInstanceSettingURI ( string $instanceId ) : string | null
$instanceId string instance identifier
Результат string | null

getMentionClassName() публичный Метод

Get the mention class name
public getMentionClassName ( ) : string
Результат string

getMentionIdentifierAttrName() публичный Метод

Get the mention identifier attribute name
public getMentionIdentifierAttrName ( ) : string
Результат string

getMentionInputName() публичный Метод

Get the mention input name
public getMentionInputName ( ) : string
Результат string

getName() абстрактный публичный Метод

Get a editor name
abstract public getName ( ) : string
Результат string

getOptions() публичный Метод

Get options
public getOptions ( ) : array
Результат array

getStaticOption() защищенный Метод

Get static option data for the editor
protected getStaticOption ( ) : array
Результат array

getTagClassName() публичный Метод

Get the tag class name
public getTagClassName ( ) : string
Результат string

getTagInputName() публичный Метод

Get the tag input name
public getTagInputName ( ) : string
Результат string

getTools() публичный Метод

Get activated tools for the editor
public getTools ( ) : AbstractTool[]
Результат AbstractTool[]

hashTag() защищенный Метод

Compile tags in content body
protected hashTag ( string $content ) : string
$content string content
Результат string

htmlable() абстрактный публичный Метод

Determine if a editor html usable.
abstract public htmlable ( ) : boolean
Результат boolean

image() защищенный Метод

Compile images in content body
protected image ( string $content ) : string
$content string content
Результат string

loadTools() защищенный Метод

Load tools
protected loadTools ( ) : void
Результат void

mention() защищенный Метод

Compile mentions in content body
protected mention ( string $content ) : string
$content string content
Результат string

render() публичный Метод

Get the evaluated contents of the object.
public render ( ) : string
Результат string

resolveImage() публичный статический Метод

Resolve image instances
public static resolveImage ( array $ids = [] ) : array
$ids array identifier list
Результат array

setArguments() публичный Метод

Set arguments for the editor
public setArguments ( array $arguments = [] )
$arguments array arguments

setConfig() публичный Метод

Set config for the editor
public setConfig ( ConfigEntity $config )
$config Xpressengine\Config\ConfigEntity config instance

setFiles() публичный Метод

Set files the editor used
public setFiles ( array $files = [] ) : void
$files array file instances
Результат void

setImageResolver() публичный статический Метод

Set the image resolver
public static setImageResolver ( callable $resolver ) : void
$resolver callable resolver
Результат void

Описание свойств

$arguments защищенное свойство

Given arguments for the editor
protected array $arguments
Результат array

$config защищенное свойство

ConfigEntity instance
protected ConfigEntity,Xpressengine\Config|null $config
Результат Xpressengine\Config\ConfigEntity | null

$defaultArguments защищенное свойство

Default editor arguments
protected array $defaultArguments
Результат array

$editors защищенное свойство

EditorHandler instance
protected EditorHandler,Xpressengine\Editor $editors
Результат EditorHandler

$events защищенное свойство

Dispatcher instance
protected Dispatcher,Illuminate\Contracts\Events $events
Результат Illuminate\Contracts\Events\Dispatcher

$fileClassName защищенное свойство

The file class name
protected string $fileClassName
Результат string

$fileIdentifierAttrName защищенное свойство

The file identifier attribute name
protected string $fileIdentifierAttrName
Результат string

$fileInputName защищенное свойство

The file input name
protected string $fileInputName
Результат string

$files защищенное свойство

Used files
protected array $files
Результат array

$frontend защищенное свойство

FrontendHandler instance
protected FrontendHandler,Xpressengine\Presenter\Html $frontend
Результат Xpressengine\Presenter\Html\FrontendHandler

$gate защищенное свойство

Gate instance
protected Gate,Illuminate\Contracts\Auth\Access $gate
Результат Illuminate\Contracts\Auth\Access\Gate

$imageClassName защищенное свойство

The image class name
protected string $imageClassName
Результат string

$imageIdentifierAttrName защищенное свойство

The image identifier attribute name
protected string $imageIdentifierAttrName
Результат string

$imageResolver защищенное статическое свойство

The image resolver
protected static callable $imageResolver
Результат callable

$instanceId защищенное свойство

Instance identifier
protected string $instanceId
Результат string

$mentionClassName защищенное свойство

The mention class name
protected string $mentionClassName
Результат string

$mentionIdentifierAttrName защищенное свойство

The mention identifier attribute name
protected string $mentionIdentifierAttrName
Результат string

$mentionInputName защищенное свойство

The mention input name
protected string $mentionInputName
Результат string

$options защищенное свойство

Options for the editor
protected null $options
Результат null

$scriptOnly защищенное свойство

Indicates if used only javascript.
protected bool $scriptOnly
Результат boolean

$skins защищенное свойство

SkinHandler instance
protected SkinHandler,Xpressengine\Skin $skins
Результат Xpressengine\Skin\SkinHandler

$tagClassName защищенное свойство

The tag class name
protected string $tagClassName
Результат string

$tagInputName защищенное свойство

The tag input name
protected string $tagInputName
Результат string

$tools защищенное свойство

The registered tools for the editor
protected AbstractTool[],Xpressengine\Editor $tools
Результат AbstractTool[]

$urls защищенное свойство

UrlGenerator instance
protected UrlGenerator,Illuminate\Contracts\Routing $urls
Результат Illuminate\Contracts\Routing\UrlGenerator