mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
31 lines
681 B
PHP
31 lines
681 B
PHP
<?php
|
|
|
|
namespace SilverStripe\CMS\Tests\Model;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use Page;
|
|
|
|
class SiteTreeTest_ClassD extends Page implements TestOnly
|
|
{
|
|
private static $table_name = 'SiteTreeTest_ClassD';
|
|
|
|
// Only allows this class, no children classes
|
|
private static $allowed_children = [
|
|
'*' . SiteTreeTest_ClassC::class,
|
|
];
|
|
|
|
private static $extensions = [
|
|
SiteTreeTest_ExtensionA::class,
|
|
SiteTreeTest_ExtensionB::class,
|
|
];
|
|
|
|
public $canEditValue = null;
|
|
|
|
public function canEdit($member = null)
|
|
{
|
|
return isset($this->canEditValue)
|
|
? $this->canEditValue
|
|
: parent::canEdit($member);
|
|
}
|
|
}
|