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 PlayerAdmin extends ModelAdmin implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $url_segment = 'playeradmin';
|
2016-11-13 08:35:43 +01:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $managed_models = array(
|
|
|
|
Player::class
|
|
|
|
);
|
2016-11-13 08:35:43 +01:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function getExportFields()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'Name' => 'Name',
|
|
|
|
'Position' => 'Position'
|
|
|
|
);
|
|
|
|
}
|
2016-11-13 08:35:43 +01:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function Link($action = null)
|
|
|
|
{
|
|
|
|
if (!$action) {
|
|
|
|
$action = $this->sanitiseClassName($this->modelClass);
|
|
|
|
}
|
|
|
|
return Controller::join_links('PlayerAdmin', $action, '/');
|
|
|
|
}
|
2016-11-13 08:35:43 +01:00
|
|
|
}
|