2017-06-21 06:29:40 +02:00
|
|
|
<?php
|
|
|
|
|
2017-08-09 04:53:38 +02:00
|
|
|
namespace SilverStripe\CMS\Tests\Model;
|
2017-08-09 03:25:12 +02:00
|
|
|
|
2017-06-21 06:29:40 +02:00
|
|
|
use SilverStripe\CMS\Model\SiteTreeExtension;
|
2017-09-04 09:48:21 +02:00
|
|
|
use SilverStripe\Control\Controller;
|
2017-06-21 06:29:40 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
|
|
|
|
class SiteTreeTest_ExtensionB extends SiteTreeExtension implements TestOnly
|
|
|
|
{
|
|
|
|
public static $can_publish = true;
|
|
|
|
|
|
|
|
public function canPublish($member)
|
|
|
|
{
|
|
|
|
return static::$can_publish;
|
|
|
|
}
|
2017-09-04 09:48:21 +02:00
|
|
|
|
|
|
|
public function updateLink(&$link, $action = null)
|
|
|
|
{
|
|
|
|
$link = Controller::join_links('http://www.updatedhost.com', $link);
|
|
|
|
}
|
2017-06-21 06:29:40 +02:00
|
|
|
}
|