Skip to content

Commit

Permalink
Merge branch '1' into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 30, 2024
2 parents 8f5e067 + f380700 commit 19b1258
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
5 changes: 4 additions & 1 deletion _config/extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ SilverStripe\FrameworkTest\Elemental\Model\ElementalBehatTestObject:
- DNADesign\Elemental\Extensions\ElementalAreasExtension
- SilverStripe\FrameworkTest\Elemental\Extension\ElementalBehatTestExtension

SilverStripe\FrameworkTest\Elemental\Model\MultiElementalBehatTestObject:
extensions:
- SilverStripe\FrameworkTest\Elemental\Extension\MultiElementalAreasExtension

BasicElementalPage:
extensions:
- DNADesign\Elemental\Extensions\ElementalPageExtension
Expand All @@ -69,7 +73,6 @@ SilverStripe\FrameworkTest\Model\Company:
extensions:
- SilverStripe\FrameworkTest\LinkField\Extensions\CompanyExtension


---
Only:
moduleexists:
Expand Down
4 changes: 4 additions & 0 deletions code/elemental/MultiElementalAreasExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
use DNADesign\Elemental\Extensions\ElementalAreasExtension;
use DNADesign\Elemental\Models\ElementalArea;

if (!class_exists(ElementalAreasExtension::class)) {
return;
}

/**
* This is used to test multiple elemental areas on a page
*/
Expand Down
13 changes: 4 additions & 9 deletions code/elemental/MutliElementalBehatTestObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace SilverStripe\FrameworkTest\Elemental\Model;

use SilverStripe\ORM\DataObject;
use SilverStripe\FrameworkTest\Elemental\Extension\MultiElementalAreasExtension;

class MultiElementalBehatTestObject extends DataObject
{
Expand All @@ -13,26 +12,22 @@ class MultiElementalBehatTestObject extends DataObject

private static $table_name = 'ElementalMultiBehatTestObject';

private static $extensions = [
MultiElementalAreasExtension::class,
];

public function canView($member = null)
public function canView($member = null)
{
return true;
}

public function canEdit($member = null)
public function canEdit($member = null)
{
return true;
}

public function canDelete($member = null)
public function canDelete($member = null)
{
return true;
}

public function canCreate($member = null, $context = [])
public function canCreate($member = null, $context = [])
{
return true;
}
Expand Down

0 comments on commit 19b1258

Please sign in to comment.