silverstripe-framework/admin/tests/ModelAdminTest/ContactAdmin.php

25 lines
575 B
PHP
Raw Normal View History

2016-11-13 08:35:43 +01:00
<?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';
2016-11-13 08:35:43 +01:00
private static $managed_models = array(
Contact::class,
);
2016-11-13 08:35:43 +01:00
public function Link($action = null)
{
if (!$action) {
$action = $this->sanitiseClassName($this->modelClass);
}
return Controller::join_links('ContactAdmin', $action, '/');
}
2016-11-13 08:35:43 +01:00
}