class DynamicFieldHandler

DynamicFieldHandler

  • Xpressengine\Database 의 ProxyManager 에 DatabaseProxy 를 등록
  • ProxyManager 의 인터페이스를 이용해서 DynamicField 데이터 처리
  • DynamicFieldHandler 를 이용해 인스턴스 관리

app binding

  • xe.dynamicField 로 바인딩 되어 있음
  • DynamicField facade 제공

사용법

Xpressengine\Database 패키지에서 처리하기 위해 ProxyInterface 를 사용함

$group

  • DynamicField 를 생성할 때 사용 한 별칭
  • DynamicField 는 Table 단위로 관리되지 않음
  • DynamicField 는 instance 별로 관리될 수 있음

관리자 Section

  • App\Sections\DynamicFieldSection 을 이용해서 설정

DynamicField 출력

  • Document 에 추가된 Dynamic field 를 blade 에서 출력

Constants

CONFIG_NAME

Properties

protected VirtualConnectionInterface $connection database connection
protected ConfigHandler $configHandler
protected RegisterHandler $registerHandler
protected Factory $viewFactory

Methods

__construct(VirtualConnectionInterface $connection, ConfigHandler $configHandler, RegisterHandler $registerHandler, Factory $viewFactory)

create instance

getConfigHandler()

get config handler

getRegisterHandler()

get register handler

Factory
getViewFactory()

get ViewFactory

connection()

get database connection

void
setConnection(VirtualConnectionInterface $connection)

set database connection DatabaseProxy 에 의해서 connection 을 변경 한다.

getDefaultJoinColumn()

DynamicField 는 기본으로 'id' 컬럼과 조인하도록 설정된다.

void
create(ConfigEntity $config, ColumnEntity $column = null)

DynamicField 생성

  • ConfigManager 를 이용해 설정 정보를 저장
  • FieldTypeManager 로 Dynamic Field Table 생성

void
put(ConfigEntity $config)

DynamicField 설정 변경

void
drop(ConfigEntity $config)

DynamicField 제거

gets(string $group)

get dynamic fields by group name

get(string $group, string $id)

get dynamic field

bool
has(string $group, string $id)

has dynamic field

getByConfig(ConfigEntity $config)

get type by dynamic field config entity

getType(string $group, string $id)

get dynamic field without skin instance

array
getRules(ConfigEntity $config)

get rules by dynamic field config entity

Details

at line 100
__construct(VirtualConnectionInterface $connection, ConfigHandler $configHandler, RegisterHandler $registerHandler, Factory $viewFactory)

create instance

Parameters

VirtualConnectionInterface $connection database connection
ConfigHandler $configHandler config handler
RegisterHandler $registerHandler register handler
Factory $viewFactory view factory

at line 117
ConfigHandler getConfigHandler()

get config handler

Return Value

ConfigHandler

at line 127
RegisterHandler getRegisterHandler()

get register handler

Return Value

RegisterHandler

at line 136
Factory getViewFactory()

get ViewFactory

Return Value

Factory

at line 146
VirtualConnectionInterface connection()

get database connection

at line 158
void setConnection(VirtualConnectionInterface $connection)

set database connection DatabaseProxy 에 의해서 connection 을 변경 한다.

Parameters

VirtualConnectionInterface $connection database connection

Return Value

void

at line 169
private ColumnEntity getDefaultJoinColumn()

DynamicField 는 기본으로 'id' 컬럼과 조인하도록 설정된다.

JoinColumn 정보가 없을 경우 기본 컬럼인 'id' 컬럼을 생성하여 리턴한다.

Return Value

ColumnEntity

at line 185
void create(ConfigEntity $config, ColumnEntity $column = null)

DynamicField 생성

  • ConfigManager 를 이용해 설정 정보를 저장
  • FieldTypeManager 로 Dynamic Field Table 생성

Parameters

ConfigEntity $config insert config entity
ColumnEntity $column join column entity

Return Value

void

at line 218
void put(ConfigEntity $config)

DynamicField 설정 변경

Parameters

ConfigEntity $config update config entity

Return Value

void

at line 229
void drop(ConfigEntity $config)

DynamicField 제거

Parameters

ConfigEntity $config config entity

Return Value

void

at line 245
Generator gets(string $group)

get dynamic fields by group name

Parameters

string $group config group name

Return Value

Generator

at line 264
AbstractType get(string $group, string $id)

get dynamic field

Parameters

string $group config group name
string $id field type id

Return Value

AbstractType

at line 281
bool has(string $group, string $id)

has dynamic field

Parameters

string $group config group name
string $id field type id

Return Value

bool

at line 292
AbstractType getByConfig(ConfigEntity $config)

get type by dynamic field config entity

Parameters

ConfigEntity $config dynamic field config entity

Return Value

AbstractType

at line 309
AbstractType getType(string $group, string $id)

get dynamic field without skin instance

Parameters

string $group config group name
string $id field type id

Return Value

AbstractType

at line 328
array getRules(ConfigEntity $config)

get rules by dynamic field config entity

Parameters

ConfigEntity $config dynamic field config entity

Return Value

array