Switch argument order in FieldList::insertAfter calls

This commit is contained in:
Robbie Averill 2018-04-06 10:21:43 +12:00
parent c123951768
commit 7c4574ba78

View File

@ -227,7 +227,7 @@ class BlogPost extends Page
/** /**
* @var FieldList $fields * @var FieldList $fields
*/ */
$fields->insertAfter($uploadField, 'Content'); $fields->insertAfter('Content', $uploadField);
$summary = HtmlEditorField::create('Summary', false); $summary = HtmlEditorField::create('Summary', false);
$summary->setRows(5); $summary->setRows(5);
@ -246,7 +246,7 @@ class BlogPost extends Page
$summaryHolder->setHeadingLevel(4); $summaryHolder->setHeadingLevel(4);
$summaryHolder->addExtraClass('custom-summary'); $summaryHolder->addExtraClass('custom-summary');
$fields->insertAfter($summaryHolder, 'FeaturedImage'); $fields->insertAfter('FeaturedImage', $summaryHolder);
$urlSegment = $fields->dataFieldByName('URLSegment'); $urlSegment = $fields->dataFieldByName('URLSegment');
$urlSegment->setURLPrefix($this->Parent()->RelativeLink()); $urlSegment->setURLPrefix($this->Parent()->RelativeLink());