silverstripe-cms/tests/php/Model/SiteTreeTest_ClassD.php

29 lines
590 B
PHP
Raw Normal View History

<?php
2017-08-09 03:25:12 +02:00
namespace SilverStripe\CMS\Tests;
use SilverStripe\Dev\TestOnly;
2017-08-09 03:25:12 +02:00
use Page;
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);
}
}