silverstripe-cms/code/Controllers/CMSPageSettingsController.php

30 lines
795 B
PHP
Raw Normal View History

<?php
2016-07-22 01:32:32 +02:00
namespace SilverStripe\CMS\Controllers;
2017-01-25 21:59:25 +01:00
class CMSPageSettingsController extends CMSMain
{
2017-01-25 21:59:25 +01:00
private static $url_segment = 'pages/settings';
2016-08-10 06:08:39 +02:00
2017-01-25 21:59:25 +01:00
private static $url_rule = '/$Action/$ID/$OtherID';
2016-08-10 06:08:39 +02:00
2017-01-25 21:59:25 +01:00
private static $url_priority = 42;
2016-08-10 06:08:39 +02:00
2017-01-25 21:59:25 +01:00
private static $required_permission_codes = 'CMS_ACCESS_CMSMain';
2015-09-29 06:18:03 +02:00
2017-01-25 21:59:25 +01:00
public function getEditForm($id = null, $fields = null)
{
$record = $this->getRecord($id ?: $this->currentPageID());
2015-09-29 06:18:03 +02:00
2017-01-25 21:59:25 +01:00
return parent::getEditForm($id, ($record) ? $record->getSettingsFields() : null);
}
2017-01-25 21:59:25 +01:00
public function Breadcrumbs($unlinked = false)
{
$crumbs = parent::Breadcrumbs($unlinked);
2017-04-20 03:15:29 +02:00
$crumbs[0]->Title = _t('SilverStripe\\CMS\\Controllers\\CMSPagesController.MENUTITLE', 'Pages');
2017-01-25 21:59:25 +01:00
return $crumbs;
}
}