mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
FIX Ensure both linkfield and elemental exist before applying extension
This commit is contained in:
parent
49f6e5f8a6
commit
38527c1da3
@ -48,15 +48,21 @@ BasicElementalPage:
|
|||||||
Only:
|
Only:
|
||||||
moduleexists: 'silverstripe/linkfield'
|
moduleexists: 'silverstripe/linkfield'
|
||||||
---
|
---
|
||||||
|
|
||||||
SilverStripe\FrameworkTest\LinkField\PageTypes\LinkFieldTestPage:
|
SilverStripe\FrameworkTest\LinkField\PageTypes\LinkFieldTestPage:
|
||||||
extensions:
|
extensions:
|
||||||
- SilverStripe\FrameworkTest\LinkField\Extensions\LinkPageExtension
|
- SilverStripe\FrameworkTest\LinkField\Extensions\LinkPageExtension
|
||||||
|
|
||||||
SilverStripe\FrameworkTest\Model\Company:
|
SilverStripe\FrameworkTest\Model\Company:
|
||||||
extensions:
|
extensions:
|
||||||
- SilverStripe\FrameworkTest\LinkField\Extensions\CompanyExtension
|
- SilverStripe\FrameworkTest\LinkField\Extensions\CompanyExtension
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
Only:
|
||||||
|
moduleexists:
|
||||||
|
- 'silverstripe/linkfield'
|
||||||
|
- 'dnadesign/silverstripe-elemental'
|
||||||
|
---
|
||||||
SilverStripe\FrameworkTest\LinkField\Blocks\LinkFieldTestBlock:
|
SilverStripe\FrameworkTest\LinkField\Blocks\LinkFieldTestBlock:
|
||||||
extensions:
|
extensions:
|
||||||
- SilverStripe\FrameworkTest\LinkField\Extensions\ElementContentExtension
|
- SilverStripe\FrameworkTest\LinkField\Extensions\ElementContentExtension
|
||||||
|
@ -4,6 +4,10 @@ namespace SilverStripe\FrameworkTest\LinkField\Blocks;
|
|||||||
|
|
||||||
use DNADesign\Elemental\Models\BaseElement;
|
use DNADesign\Elemental\Models\BaseElement;
|
||||||
|
|
||||||
|
if (!class_exists(BaseElement::class)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
class LinkFieldTestBlock extends BaseElement
|
class LinkFieldTestBlock extends BaseElement
|
||||||
{
|
{
|
||||||
private static string $table_name = 'LinkFieldTestBlock';
|
private static string $table_name = 'LinkFieldTestBlock';
|
||||||
|
Loading…
Reference in New Issue
Block a user