silverstripe-framework/admin/tests/ModelAdminTest/ContactAdmin.php
2016-12-19 16:08:19 +13:00

25 lines
575 B
PHP

<?php
namespace SilverStripe\Admin\Tests\ModelAdminTest;
use SilverStripe\Admin\ModelAdmin;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
class ContactAdmin extends ModelAdmin implements TestOnly
{
private static $url_segment = 'contactadmin';
private static $managed_models = array(
Contact::class,
);
public function Link($action = null)
{
if (!$action) {
$action = $this->sanitiseClassName($this->modelClass);
}
return Controller::join_links('ContactAdmin', $action, '/');
}
}