mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
APICHANGE: add documentation to changeset r74858.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@74901 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
859bbb2eaa
commit
3861c33bc1
@ -2672,6 +2672,8 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP
|
||||
*
|
||||
* @uses $field_labels
|
||||
* @uses FormField::name_to_label()
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
* @return array of all element labels if no argument given
|
||||
* @return string of label if field
|
||||
|
@ -132,6 +132,11 @@ class ErrorPage extends Page {
|
||||
return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
$labels['ErrorCode'] = _t('ErrorPage.CODE', "Error code");
|
||||
|
@ -1292,6 +1292,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
|
||||
|
@ -206,8 +206,8 @@ abstract class BulkLoader extends ViewableData {
|
||||
$spec = array();
|
||||
|
||||
// get database columns (fieldlabels include fieldname as a key)
|
||||
// using $$includerelations flag as false, so that it only contain $db fields
|
||||
$spec['fields'] = (array)singleton($this->objectClass)->fieldLabels($includerelations=false);
|
||||
// Debug::show($spec);die;
|
||||
|
||||
$has_ones = singleton($this->objectClass)->has_one();
|
||||
$has_manys = singleton($this->objectClass)->has_many();
|
||||
|
@ -596,6 +596,11 @@ class File extends DataObject {
|
||||
self::$cache_file_fields = null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
$labels['Name'] = _t('File.Name', 'Name');
|
||||
|
@ -111,6 +111,11 @@ class Group extends DataObject {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
$labels['Title'] = _t('SecurityAdmin.GROUPNAME', 'Group name');
|
||||
|
@ -33,6 +33,11 @@ class LoginAttempt extends DataObject {
|
||||
|
||||
static $belongs_many_many = array();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
$labels['Email'] = _t('LoginAttempt.Email', 'Email Address');
|
||||
|
@ -865,6 +865,11 @@ class Member extends DataObject {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
|
||||
|
@ -219,6 +219,11 @@ class i18nTest_DataObject extends DataObject implements TestOnly {
|
||||
'ManyManyRelation' => 'Member'
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
|
||||
*
|
||||
*/
|
||||
function fieldLabels($includerelations = true) {
|
||||
$labels = parent::fieldLabels($includerelations);
|
||||
$labels['MyProperty'] = _t('i18nTest_DataObject.MyProperty', 'My Property');
|
||||
|
Loading…
Reference in New Issue
Block a user