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

23 lines
499 B
PHP
Raw Normal View History

<?php
2017-08-09 04:53:38 +02:00
namespace SilverStripe\CMS\Tests\Model;
2017-08-09 03:25:12 +02:00
use SilverStripe\CMS\Model\SiteTreeExtension;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
class SiteTreeTest_ExtensionA extends SiteTreeExtension implements TestOnly
{
public static $can_publish = true;
public function canPublish($member)
{
return static::$can_publish;
}
public function updateLink(&$link, $action = null)
{
$link = Controller::join_links($link, '?extra=1');
}
}