69 lines
1.4 KiB
Plaintext
69 lines
1.4 KiB
Plaintext
<?php
|
|
|
|
namespace DummyNamespace;
|
|
|
|
use Xpressengine\Config\ConfigEntity;
|
|
use Xpressengine\DynamicField\AbstractType;
|
|
use Xpressengine\DynamicField\ColumnEntity;
|
|
use Xpressengine\DynamicField\ColumnDataType;
|
|
|
|
class DummyClass extends AbstractType
|
|
{
|
|
|
|
protected static $path = 'DummyPluginId/DummyFieldDirname';
|
|
|
|
/**
|
|
* get field type name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function name()
|
|
{
|
|
return 'DummyName';
|
|
}
|
|
|
|
/**
|
|
* get field type description
|
|
*
|
|
* @return string
|
|
*/
|
|
public function description()
|
|
{
|
|
return 'DummyDescription';
|
|
}
|
|
|
|
/**
|
|
* return columns
|
|
*
|
|
* @return ColumnEntity[]
|
|
*/
|
|
public function getColumns()
|
|
{
|
|
return [
|
|
'column'=>new ColumnEntity('column', ColumnDataType::STRING)
|
|
];
|
|
}
|
|
|
|
/**
|
|
* 다이나믹필스 생성할 때 타입 설정에 적용될 rule 반환
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getSettingsRules()
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Dynamic Field 설정 페이지에서 각 fieldType 에 필요한 설정 등록 페이지 반환
|
|
* return html tag string
|
|
*
|
|
* @param ConfigEntity $config config entity
|
|
* @return string
|
|
*/
|
|
public function getSettingsView(ConfigEntity $config = null)
|
|
{
|
|
return view('DummyPluginId::DummyFieldDirname/views/setting');
|
|
}
|
|
}
|