mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API Upgrade CMS to use new Config API
This commit is contained in:
parent
a7efeb06d3
commit
4885736b0e
@ -1,7 +1,6 @@
|
||||
---
|
||||
Name: modelascontrollerroutes
|
||||
Before: '*'
|
||||
After: '#rootroutes'
|
||||
After: '*'
|
||||
---
|
||||
SilverStripe\Control\Director:
|
||||
rules:
|
||||
@ -11,7 +10,6 @@ SilverStripe\Control\Director:
|
||||
'$URLSegment//$Action/$ID/$OtherID': 'SilverStripe\CMS\Controllers\ModelAsController'
|
||||
---
|
||||
Name: legacycmsroutes
|
||||
After: '#adminroutes'
|
||||
---
|
||||
SilverStripe\Control\Director:
|
||||
rules:
|
||||
|
@ -952,7 +952,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||
new GridFieldSortableHeader(),
|
||||
new GridFieldDataColumns(),
|
||||
new GridFieldPaginator(self::config()->page_length)
|
||||
new GridFieldPaginator($this->config()->get('page_length'))
|
||||
);
|
||||
if ($parentID) {
|
||||
$linkSpec = $this->Link();
|
||||
|
@ -8,7 +8,6 @@ use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Forms\Form;
|
||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||
|
||||
|
@ -1573,7 +1573,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
||||
));
|
||||
}
|
||||
|
||||
$charset = ContentNegotiator::config()->get('encoding');
|
||||
$charset = ContentNegotiator::config()->uninherited('encoding');
|
||||
$tags[] = FormField::create_tag('meta', array(
|
||||
'http-equiv' => 'Content-Type',
|
||||
'content' => 'text/html; charset=' . $charset,
|
||||
|
@ -102,7 +102,10 @@ class VirtualPage extends Page
|
||||
*/
|
||||
public function getNonVirtualisedFields()
|
||||
{
|
||||
return array_merge($this->config()->non_virtual_fields, $this->config()->initially_copied_fields);
|
||||
return array_merge(
|
||||
VirtualPage::config()->non_virtual_fields,
|
||||
VirtualPage::config()->initially_copied_fields
|
||||
);
|
||||
}
|
||||
|
||||
public function setCopyContentFromID($val)
|
||||
@ -417,7 +420,7 @@ class VirtualPage extends Page
|
||||
* Pass unrecognized method calls on to the original data object
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $args
|
||||
* @param array $args
|
||||
* @return mixed
|
||||
*/
|
||||
public function __call($method, $args)
|
||||
|
Loading…
Reference in New Issue
Block a user