mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge pull request #123 from stojg/make-subsite-domain-decoratable
SubsiteDomain don't call decorators updateCMSFields
This commit is contained in:
commit
d21881d7b4
@ -2,15 +2,27 @@
|
|||||||
|
|
||||||
class SubsiteDomain extends DataObject {
|
class SubsiteDomain extends DataObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private static $db = array(
|
private static $db = array(
|
||||||
"Domain" => "Varchar(255)",
|
"Domain" => "Varchar(255)",
|
||||||
"IsPrimary" => "Boolean",
|
"IsPrimary" => "Boolean",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private static $has_one = array(
|
private static $has_one = array(
|
||||||
"Subsite" => "Subsite",
|
"Subsite" => "Subsite",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private static $summary_fields=array(
|
private static $summary_fields=array(
|
||||||
'Domain',
|
'Domain',
|
||||||
'IsPrimary',
|
'IsPrimary',
|
||||||
@ -25,13 +37,24 @@ class SubsiteDomain extends DataObject {
|
|||||||
Subsite::writeHostMap();
|
Subsite::writeHostMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return \FieldList
|
||||||
|
*/
|
||||||
public function getCMSFields() {
|
public function getCMSFields() {
|
||||||
return new FieldList(
|
$fields = new FieldList(
|
||||||
new TextField('Domain', $this->fieldLabel('Domain'), null, 255),
|
new TextField('Domain', $this->fieldLabel('Domain'), null, 255),
|
||||||
new CheckboxField('IsPrimary', $this->fieldLabel('IsPrimary'))
|
new CheckboxField('IsPrimary', $this->fieldLabel('IsPrimary'))
|
||||||
);
|
);
|
||||||
|
$this->extend('updateCMSFields', $fields);
|
||||||
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param bool $includerelations
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function fieldLabels($includerelations = true) {
|
public function fieldLabels($includerelations = true) {
|
||||||
$labels = parent::fieldLabels($includerelations);
|
$labels = parent::fieldLabels($includerelations);
|
||||||
$labels['Domain'] = _t('SubsiteDomain.DOMAIN', 'Domain');
|
$labels['Domain'] = _t('SubsiteDomain.DOMAIN', 'Domain');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user