mirror of
https://github.com/a2nt/silverstripe-elemental-basics.git
synced 2024-10-22 17:05:54 +02:00
FIX: SS5 API
This commit is contained in:
parent
32d8fa88c3
commit
6ed295156f
@ -31,12 +31,15 @@ class BaseElementEx extends DataExtension
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
if ($obj->ID) {
|
||||
$fields->insertBefore(LiteralField::create(
|
||||
'AnchorName',
|
||||
'<div class="field"><div class="form__field-holder">'
|
||||
.'Element Anchor name: <b>#e'.$obj->ID.'</b>'
|
||||
.'</div></div>'
|
||||
), 'Title');
|
||||
$fields->insertBefore(
|
||||
'Title',
|
||||
LiteralField::create(
|
||||
'AnchorName',
|
||||
'<div class="field"><div class="form__field-holder">'
|
||||
.'Element Anchor name: <b>#e'.$obj->ID.'</b>'
|
||||
.'</div></div>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.Settings');
|
||||
@ -74,7 +77,7 @@ class BaseElementEx extends DataExtension
|
||||
|
||||
public function updateCMSEditLink(&$link): void
|
||||
{
|
||||
if(!method_exists($this->owner, 'inlineEditable')) {
|
||||
if (!method_exists($this->owner, 'inlineEditable')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user