當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataObject::fieldLabels方法代碼示例

本文整理匯總了PHP中SilverStripe\ORM\DataObject::fieldLabels方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataObject::fieldLabels方法的具體用法?PHP DataObject::fieldLabels怎麽用?PHP DataObject::fieldLabels使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SilverStripe\ORM\DataObject的用法示例。


在下文中一共展示了DataObject::fieldLabels方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fieldLabels

 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['Title'] = _t('PermissionRole.Title', 'Title');
     $labels['OnlyAdminCanApply'] = _t('PermissionRole.OnlyAdminCanApply', 'Only admin can apply', 'Checkbox to limit which user can apply this role');
     return $labels;
 }
開發者ID:SpiritLevel,項目名稱:silverstripe-framework,代碼行數:7,代碼來源:PermissionRole.php

示例2: fieldLabels

 /**
  * @param bool $includerelations Indicate if the labels returned include relation fields
  * @return array
  */
 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['Email'] = _t('LoginAttempt.Email', 'Email Address');
     $labels['Status'] = _t('LoginAttempt.Status', 'Status');
     $labels['IP'] = _t('LoginAttempt.IP', 'IP Address');
     return $labels;
 }
開發者ID:jacobbuck,項目名稱:silverstripe-framework,代碼行數:12,代碼來源:LoginAttempt.php

示例3: fieldLabels

 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['Name'] = _t('ChangeSet.NAME', 'Name');
     $labels['State'] = _t('ChangeSet.STATE', 'State');
     return $labels;
 }
開發者ID:SpiritLevel,項目名稱:silverstripe-framework,代碼行數:7,代碼來源:ChangeSet.php

示例4: fieldLabels

 /**
  *
  * @param boolean $includerelations a boolean value to indicate if the labels returned include relation fields
  *
  */
 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['MyProperty'] = _t('i18nTest_DataObject.MyProperty', 'My Property');
     return $labels;
 }
開發者ID:jacobbuck,項目名稱:silverstripe-framework,代碼行數:11,代碼來源:i18nTest.php

示例5: fieldLabels

 /**
  * @param bool $includerelations Indicate if the labels returned include relation fields
  * @return array
  */
 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['FirstName'] = _t('Member.FIRSTNAME', 'First Name');
     $labels['Surname'] = _t('Member.SURNAME', 'Surname');
     $labels['Email'] = _t('Member.EMAIL', 'Email');
     $labels['Password'] = _t('Member.db_Password', 'Password');
     $labels['PasswordExpiry'] = _t('Member.db_PasswordExpiry', 'Password Expiry Date', 'Password expiry date');
     $labels['LockedOutUntil'] = _t('Member.db_LockedOutUntil', 'Locked out until', 'Security related date');
     $labels['Locale'] = _t('Member.db_Locale', 'Interface Locale');
     $labels['DateFormat'] = _t('Member.DATEFORMAT', 'Date format');
     $labels['TimeFormat'] = _t('Member.TIMEFORMAT', 'Time format');
     if ($includerelations) {
         $labels['Groups'] = _t('Member.belongs_many_many_Groups', 'Groups', 'Security Groups this member belongs to');
     }
     return $labels;
 }
開發者ID:jacobbuck,項目名稱:silverstripe-framework,代碼行數:21,代碼來源:Member.php

示例6: fieldLabels

 /**
  * @param bool $includerelations Indicate if the labels returned include relation fields
  * @return array
  */
 public function fieldLabels($includerelations = true)
 {
     $labels = parent::fieldLabels($includerelations);
     $labels['Title'] = _t('SecurityAdmin.GROUPNAME', 'Group name');
     $labels['Description'] = _t('Group.Description', 'Description');
     $labels['Code'] = _t('Group.Code', 'Group Code', 'Programmatical code identifying a group');
     $labels['Locked'] = _t('Group.Locked', 'Locked?', 'Group is locked in the security administration area');
     $labels['Sort'] = _t('Group.Sort', 'Sort Order');
     if ($includerelations) {
         $labels['Parent'] = _t('Group.Parent', 'Parent Group', 'One group has one parent group');
         $labels['Permissions'] = _t('Group.has_many_Permissions', 'Permissions', 'One group has many permissions');
         $labels['Members'] = _t('Group.many_many_Members', 'Members', 'One group has many members');
     }
     return $labels;
 }
開發者ID:SpiritLevel,項目名稱:silverstripe-framework,代碼行數:19,代碼來源:Group.php


注:本文中的SilverStripe\ORM\DataObject::fieldLabels方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。