-
Notifications
You must be signed in to change notification settings - Fork 15
/
Type.php
48 lines (40 loc) · 1.22 KB
/
Type.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace SilverStripe\LinkField\Type;
use SilverStripe\Forms\FieldList;
use SilverStripe\LinkField\JsonData;
/**
* Define a link type that can be edited in Link Field
*
* @deprecated 3.0.0 Will be removed without equivalent functionality to replace it
*/
interface Type
{
/**
* Call once on the main request. Can be used to require front end assets.
*/
public function defineLinkTypeRequirements();
/**
* Each Type of link must specify a frontend handler that will determine what happens when it gets selected.
*/
public function LinkTypeHandlerName(): string;
/**
* What should be the link description be given this data.
*/
public function generateLinkDescription(array $data): string;
/**
* Human readbale title of this link type
*/
public function LinkTypeTile(): string;
/**
* Build a list of fields suitable to edit this link type
* @param array $data
* @return FieldList
*/
public function scaffoldLinkFields(array $data): FieldList;
/**
* Create a new instance of this Link from the provided Data
* @param array $data
* @return JsonData
*/
public function loadLinkData(array $data): JsonData;
}