1 | <?php |
||
2 | namespace Chillu\ElementalEmbedlyBlock\Extension; |
||
3 | |||
4 | use SilverStripe\Forms\FieldList; |
||
5 | use SilverStripe\Forms\TextField; |
||
6 | use SilverStripe\ORM\DataExtension; |
||
7 | |||
8 | class EmbedlySiteConfigExtension extends DataExtension |
||
9 | { |
||
10 | private static $db = [ |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
11 | 'ElementalEmbedlyApiKey' => 'Varchar(100)' |
||
12 | ]; |
||
13 | |||
14 | public function updateCMSFields(FieldList $fields) |
||
15 | { |
||
16 | parent::updateCMSFields($fields); |
||
17 | |||
18 | $apiField = (new TextField('ElementalEmbedlyApiKey', 'Embedly API Key')) |
||
19 | ->setDescription('See https://docs.embed.ly/?path=docs/apis'); |
||
20 | $fields->addFieldToTab('Root.Main', $apiField); |
||
21 | |||
22 | return $fields; |
||
23 | } |
||
24 | } |
||
25 |