mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT Setting default group title in Group->populateDefaults()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92564 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b1300f7c49
commit
58cfa9ffca
@ -180,6 +180,15 @@ class Group extends DataObject {
|
|||||||
return $labels;
|
return $labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function populateDefaults() {
|
||||||
|
parent::populateDefaults();
|
||||||
|
|
||||||
|
if(!$this->Title) $this->Title = sprintf(
|
||||||
|
_t('GROUP.NEWITEM',"New %s"),
|
||||||
|
singleton($this->class)->i18n_singular_name()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a member to a group.
|
* Add a member to a group.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user