mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG SiteTree->provideI18nEntities() limited to class
Called for each subclass by the collector, so we don't need to aggregate here. In fact, its harmful because it causes entities to be placed in the wrong definitions file. The <class>.DESCRIPTION entity was always placed in cms/lang/en.yml, regardless of the original location of the file containing the class.
This commit is contained in:
parent
e925401cc3
commit
39a9093715
@ -2712,16 +2712,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
|
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
|
||||||
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
|
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
|
||||||
|
|
||||||
$types = ClassInfo::subclassesFor('SiteTree');
|
$entities[$this->class . '.DESCRIPTION'] = array(
|
||||||
foreach($types as $k => $type) {
|
$this->stat('description'),
|
||||||
$inst = singleton($type);
|
'Description of the page type (shown in the "add page" dialog)'
|
||||||
$entities[$type . '.DESCRIPTION'] = array(
|
);
|
||||||
$inst->stat('description'),
|
|
||||||
|
|
||||||
'Description of the page type (shown in the "add page" dialog)'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user