abstract class AbstractEditor implements ComponentInterface

Class AbstractEditor

Traits

ComponentInterface를 구현한 Trait
Theme나 skin과 같이 html을 출력하는 컴포넌트에서 사용할 수 있는 Trait으로서, 컴포넌트가 mobile 버전, desktop 버전을 지원하는지에 대한 정보를 제공한다.

Properties

static private array $id Component id, 만약 이 trait을 사용한 클래스를 상속한 클래스가 id를 지정하지 않았다면, 그 클래스의 id는 이 trait에서 가지고 있는 id에 저장된다. from ComponentTrait
static private array $componentInfo Component Informations, 만약 이 trait을 사용한 클래스를 상속한 클래스가 componentInfo를 지정하지 않았다면, 그 클래스의 infomation은 이 trait에서 가지고 있는 componentInfo에 저장된다. from ComponentTrait
static protected bool $supportDesktop from MobileSupportTrait
static protected bool $supportMobile from MobileSupportTrait
protected EditorHandler $editors EditorHandler instance
protected UrlGenerator $urls UrlGenerator instance
protected Gate $gate Gate instance
protected SkinHandler $skins SkinHandler instance
protected Dispatcher $events Dispatcher instance
protected FrontendHandler $frontend FrontendHandler instance
protected string $instanceId Instance identifier
protected ConfigEntity|null $config ConfigEntity instance
protected array $arguments Given arguments for the editor
protected null $options Options for the editor
protected array $files Used files
protected bool $scriptOnly Indicates if used only javascript.
protected AbstractTool[] $tools The registered tools for the editor
static protected callable $imageResolver The image resolver
protected array $defaultArguments Default editor arguments
protected string $fileInputName The file input name
protected string $tagInputName The tag input name
protected string $mentionInputName The mention input name
protected string $fileClassName The file class name
protected string $imageClassName The image class name
protected string $tagClassName The tag class name
protected string $mentionClassName The mention class name
protected string $fileIdentifierAttrName The file identifier attribute name
protected string $imageIdentifierAttrName The image identifier attribute name
protected string $mentionIdentifierAttrName The mention identifier attribute name

Methods

static string
getId()

component의 id를 반환한다.

static void
setId(string $id)

component의 id를 지정한다.

static mixed
getComponentInfo(string $key = null)

information을 검색한다.

static void
setComponentInfo(string $key, mixed $value = null)

information을 추가하거나 수정한다.

static void
boot()

boot

static null|string
getSettingsURI()

return settings manage uri

static bool
supportDesktop()

desktop 버전 지원 여부를 조사한다.

static bool
supportMobile()

mobile 버전 지원 여부를 조사한다.

static bool
support(string $version)

지정된 버전을 지원하는지 조사한다.

__construct(EditorHandler $editors, UrlGenerator $urls, Gate $gate, SkinHandler $skins, Dispatcher $events, FrontendHandler $frontend, string $instanceId)

AbstractEditor constructor.

$this
setConfig(ConfigEntity $config)

Set config for the editor

getConfig()

Get config for the editor

$this
setArguments(array $arguments = array())

Set arguments for the editor

array
getArguments()

Get arguments for the editor

void
setFiles(array $files = array())

Set files the editor used

string
getName()

Get a editor name

boolean
htmlable()

Determine if a editor html usable.

array
getOptions()

Get options

array
buildOptions()

Build options

array
getStaticOption()

Get static option data for the editor

array
getDynamicOption()

Get dynamic option data for the editor

array
getActivateToolIds()

Get activated tool's identifier for the editor

void
loadTools()

Load tools

getTools()

Get activated tools for the editor

string
render()

Get the evaluated contents of the object.

string
compile(string $content, bool $htmlable = false)

Compile the raw content to be useful

string
compileBody(string $content)

Compile content body

string
getContentHtml()

Get a content html tag string

string
getContentDomHtmlOption(array $domOptions)

Get attributes string for content html tag

mixed
getEditorScript(array $options)

Get script for running the editor

array
getCustomOptions()

Get options for some editor only

string
hashTag(string $content)

Compile tags in content body

string
mention(string $content)

Compile mentions in content body

string
link(string $content)

Compile links in content body

string
image(string $content)

Compile images in content body

array
getData(string $content, string $selector, array $attributes = array())

Get html node data

static void
setImageResolver(callable $resolver)

Set the image resolver

static array
resolveImage(array $ids = array())

Resolve image instances

Crawler
createCrawler(string $content)

Create crawler instance

string
getInstanceId()

Get instance id for the editor

static string|null
getInstanceSettingURI(string $instanceId)

Get uri for custom setting

string
getFileInputName()

Get the file input name

string
getTagInputName()

Get the tag input name

string
getMentionInputName()

Get the mention input name

string
getFileClassName()

Get the file class name

string
getImageClassName()

Get the image class name

string
getTagClassName()

Get the tag class name

string
getMentionClassName()

Get the mention class name

string
getFileIdentifierAttrName()

Get the file identifier attribute name

string
getImageIdentifierAttrName()

Get the image identifier attribute name

string
getMentionIdentifierAttrName()

Get the mention identifier attribute name

Details

in ComponentTrait at line 51
static string getId()

component의 id를 반환한다.

Return Value

string

in ComponentTrait at line 67
static void setId(string $id)

component의 id를 지정한다.

Parameters

string $id 지정할 id

Return Value

void

in ComponentTrait at line 83
static mixed getComponentInfo(string $key = null)

information을 검색한다.

Parameters

string $key 검색할 information의 키

Return Value

mixed 검색된 information를 반환함.

in ComponentTrait at line 99
static void setComponentInfo(string $key, mixed $value = null)

information을 추가하거나 수정한다.

Parameters

string $key 추가하거나 수정할 information의 key
mixed $value 추가하거나 수정할 information의 value

Return Value

void

in ComponentTrait at line 119
static void boot()

boot

Return Value

void

in ComponentTrait at line 129
static null|string getSettingsURI()

return settings manage uri

Return Value

null|string

in MobileSupportTrait at line 42
static bool supportDesktop()

desktop 버전 지원 여부를 조사한다.

Return Value

bool

in MobileSupportTrait at line 52
static bool supportMobile()

mobile 버전 지원 여부를 조사한다.

Return Value

bool

in MobileSupportTrait at line 64
static bool support(string $version)

지정된 버전을 지원하는지 조사한다.

Parameters

string $version version

Return Value

bool

at line 235
__construct(EditorHandler $editors, UrlGenerator $urls, Gate $gate, SkinHandler $skins, Dispatcher $events, FrontendHandler $frontend, string $instanceId)

AbstractEditor constructor.

Parameters

EditorHandler $editors EditorHandler instance
UrlGenerator $urls UrlGenerator instance
Gate $gate Gate instance
SkinHandler $skins SkinHandler instance
Dispatcher $events Dispatcher instance
FrontendHandler $frontend FrontendHandler instance
string $instanceId Instance identifier

at line 259
$this setConfig(ConfigEntity $config)

Set config for the editor

Parameters

ConfigEntity $config config instance

Return Value

$this

at line 271
null|ConfigEntity getConfig()

Get config for the editor

Return Value

null|ConfigEntity

at line 282
$this setArguments(array $arguments = array())

Set arguments for the editor

Parameters

array $arguments arguments

Return Value

$this

at line 298
array getArguments()

Get arguments for the editor

Return Value

array

at line 309
void setFiles(array $files = array())

Set files the editor used

Parameters

array $files file instances

Return Value

void

at line 319
abstract string getName()

Get a editor name

Return Value

string

at line 326
abstract boolean htmlable()

Determine if a editor html usable.

Return Value

boolean

at line 333
array getOptions()

Get options

Return Value

array

at line 347
protected array buildOptions()

Build options

Return Value

array

at line 363
protected array getStaticOption()

Get static option data for the editor

Return Value

array

at line 405
protected array getDynamicOption()

Get dynamic option data for the editor

Return Value

array

at line 433
array getActivateToolIds()

Get activated tool's identifier for the editor

Return Value

array

at line 443
protected void loadTools()

Load tools

Return Value

void

at line 455
AbstractTool[] getTools()

Get activated tools for the editor

Return Value

AbstractTool[]

at line 474
string render()

Get the evaluated contents of the object.

Return Value

string

at line 495
string compile(string $content, bool $htmlable = false)

Compile the raw content to be useful

Parameters

string $content content
bool $htmlable content is htmlable

Return Value

string

at line 518
abstract protected string compileBody(string $content)

Compile content body

Parameters

string $content content

Return Value

string

at line 525
protected string getContentHtml()

Get a content html tag string

Return Value

string

at line 547
protected string getContentDomHtmlOption(array $domOptions)

Get attributes string for content html tag

Parameters

array $domOptions dom options

Return Value

string

at line 563
protected mixed getEditorScript(array $options)

Get script for running the editor

Parameters

array $options options

Return Value

mixed

at line 587
array getCustomOptions()

Get options for some editor only

Return Value

array

at line 598
protected string hashTag(string $content)

Compile tags in content body

Parameters

string $content content

Return Value

string

at line 619
protected string mention(string $content)

Compile mentions in content body

Parameters

string $content content

Return Value

string

Compile links in content body

Parameters

string $content content

Return Value

string

at line 656
protected string image(string $content)

Compile images in content body

Parameters

string $content content

Return Value

string

at line 705
private array getData(string $content, string $selector, array $attributes = array())

Get html node data

Parameters

string $content content
string $selector selector string
array $attributes attribute names

Return Value

array

at line 732
static void setImageResolver(callable $resolver)

Set the image resolver

Parameters

callable $resolver resolver

Return Value

void

at line 743
static array resolveImage(array $ids = array())

Resolve image instances

Parameters

array $ids identifier list

Return Value

array

at line 756
private Crawler createCrawler(string $content)

Create crawler instance

Parameters

string $content content

Return Value

Crawler

at line 766
string getInstanceId()

Get instance id for the editor

Return Value

string

at line 777
static string|null getInstanceSettingURI(string $instanceId)

Get uri for custom setting

Parameters

string $instanceId instance identifier

Return Value

string|null

at line 787
string getFileInputName()

Get the file input name

Return Value

string

at line 797
string getTagInputName()

Get the tag input name

Return Value

string

at line 807
string getMentionInputName()

Get the mention input name

Return Value

string

at line 817
string getFileClassName()

Get the file class name

Return Value

string

at line 827
string getImageClassName()

Get the image class name

Return Value

string

at line 837
string getTagClassName()

Get the tag class name

Return Value

string

at line 847
string getMentionClassName()

Get the mention class name

Return Value

string

at line 857
string getFileIdentifierAttrName()

Get the file identifier attribute name

Return Value

string

at line 867
string getImageIdentifierAttrName()

Get the image identifier attribute name

Return Value

string

at line 877
string getMentionIdentifierAttrName()

Get the mention identifier attribute name

Return Value

string