2017-06-21 06:29:40 +02:00
|
|
|
<?php
|
|
|
|
|
2017-08-09 03:25:12 +02:00
|
|
|
namespace SilverStripe\CMS\Tests;
|
|
|
|
|
|
|
|
|
2017-06-21 06:29:40 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2017-08-09 03:25:12 +02:00
|
|
|
use Page;
|
|
|
|
|
2017-06-21 06:29:40 +02:00
|
|
|
|
|
|
|
class SiteTreeTest_ClassD extends Page implements TestOnly
|
|
|
|
{
|
|
|
|
// Only allows this class, no children classes
|
|
|
|
private static $allowed_children = array('*SiteTreeTest_ClassC');
|
|
|
|
|
|
|
|
private static $extensions = [
|
|
|
|
'SiteTreeTest_ExtensionA',
|
|
|
|
'SiteTreeTest_ExtensionB',
|
|
|
|
];
|
|
|
|
|
|
|
|
public $canEditValue = null;
|
|
|
|
|
|
|
|
public function canEdit($member = null)
|
|
|
|
{
|
|
|
|
return isset($this->canEditValue)
|
|
|
|
? $this->canEditValue
|
|
|
|
: parent::canEdit($member);
|
|
|
|
}
|
|
|
|
}
|