generated from silverstripe/silverstripe-module
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve support for base and extended classes
- Loading branch information
1 parent
e23e781
commit a9274fc
Showing
11 changed files
with
252 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Terraformers\KeysForCache\Tests\Mocks\Models; | ||
|
||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\Versioned\Versioned; | ||
use Terraformers\KeysForCache\Tests\Mocks\Pages\ExtendedCaresPage; | ||
|
||
class BaseCaredHasManyModel extends DataObject | ||
{ | ||
private static array $db = [ | ||
'Title' => 'Varchar', | ||
]; | ||
|
||
private static array $has_one = [ | ||
'ExtendedCaresPage' => ExtendedCaresPage::class, | ||
]; | ||
|
||
private static array $extensions = [ | ||
Versioned::class, | ||
]; | ||
|
||
private static string $table_name = 'BaseCaredHasManyModel'; | ||
|
||
private static bool $has_cache_key = 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,26 @@ | ||
<?php | ||
|
||
namespace Terraformers\KeysForCache\Tests\Mocks\Models; | ||
|
||
use SilverStripe\ORM\DataObject; | ||
use SilverStripe\Versioned\Versioned; | ||
use Terraformers\KeysForCache\Tests\Mocks\Pages\ExtendedCaresPage; | ||
|
||
class BaseCaredHasOneModel extends DataObject | ||
{ | ||
private static array $db = [ | ||
'Title' => 'Varchar', | ||
]; | ||
|
||
private static array $has_many = [ | ||
'ExtendedCaresPages' => ExtendedCaresPage::class, | ||
]; | ||
|
||
private static array $extensions = [ | ||
Versioned::class, | ||
]; | ||
|
||
private static string $table_name = 'BaseCaredHasOneModel'; | ||
|
||
private static bool $has_cache_key = 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,12 @@ | ||
<?php | ||
|
||
namespace Terraformers\KeysForCache\Tests\Mocks\Models; | ||
|
||
class ExtendedCaredHasManyModel extends BaseCaredHasManyModel | ||
{ | ||
private static array $db = [ | ||
'Description' => 'Varchar', | ||
]; | ||
|
||
private static string $table_name = 'ExtendedCaredHasManyModel'; | ||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace Terraformers\KeysForCache\Tests\Mocks\Models; | ||
|
||
class ExtendedCaredHasOneModel extends BaseCaredHasOneModel | ||
{ | ||
private static array $db = [ | ||
'Description' => 'Varchar', | ||
]; | ||
|
||
private static string $table_name = 'ExtendedCaredHasOneModel'; | ||
} |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
|
||
class ExtendedTouchedPage extends TouchedPage | ||
{ | ||
private static string $table_name = 'ExtendedTouchedPage'; | ||
} |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
|
||
class ExtendedTouchesPage extends TouchesPage | ||
{ | ||
private static string $table_name = 'ExtendedTouchesPage'; | ||
} |
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