-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
268 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
SilverStripe\Dev\Tests\CsvBulkLoaderTest\Team: | ||
team1: | ||
Title: My Team | ||
|
||
SilverStripe\Dev\Tests\CsvBulkLoaderTest\CantDeleteModel: | ||
model1: | ||
Title: Record 1 | ||
model2: | ||
Title: Record 2 | ||
model3: | ||
Title: Record 3 | ||
|
||
SilverStripe\Dev\Tests\CsvBulkLoaderTest\CantEditModel: | ||
model1: | ||
Title: Record 1 | ||
model2: | ||
Title: Record 2 | ||
model3: | ||
Title: Record 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace SilverStripe\Dev\Tests\CsvBulkLoaderTest; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\DataObject; | ||
|
||
class CanModifyModel extends DataObject implements TestOnly | ||
{ | ||
private static $table_name = 'CsvBulkLoaderTest_CanModifyModel'; | ||
|
||
private static array $db = [ | ||
'Title' => 'Varchar', | ||
'AnotherField' => 'Varchar', | ||
]; | ||
|
||
public function canCreate($member = null, $context = []) | ||
{ | ||
return true; | ||
} | ||
|
||
public function canEdit($member = null) | ||
{ | ||
return true; | ||
} | ||
|
||
public function canDelete($member = null) | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace SilverStripe\Dev\Tests\CsvBulkLoaderTest; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
|
||
class CantCreateModel extends CanModifyModel implements TestOnly | ||
{ | ||
public function canCreate($member = null, $context = []) | ||
{ | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace SilverStripe\Dev\Tests\CsvBulkLoaderTest; | ||
|
||
use SilverStripe\Dev\TestOnly; | ||
use SilverStripe\ORM\DataObject; | ||
|
||
class CantDeleteModel extends DataObject implements TestOnly | ||
{ | ||
private static $table_name = 'CsvBulkLoaderTest_CantDeleteModel'; | ||
|
||
private static array $db = [ | ||
'Title' => 'Varchar', | ||
'AnotherField' => 'Varchar', | ||
]; | ||
|
||
public function canCreate($member = null, $context = []) | ||
{ | ||
return true; | ||
} | ||
|
||
public function canEdit($member = null) | ||
{ | ||
return true; | ||
} | ||
|
||
public function canDelete($member = null) | ||
{ | ||
return false; | ||
} | ||
} |
Oops, something went wrong.