$title=$this->database->query('SELECT name FROM {users_field_data} WHERE uid = :uid AND default_langcode = 1',array(':uid'=>$this->argument))->fetchField();
}
if(empty($title)){
returnt('No user');
return$this->t('No user');
}
returnString::checkPlain($title);
...
...
@@ -108,7 +108,7 @@ public function query($group_by = FALSE) {
'#description'=>t('Fields to be included as contextual links.'),
'#title'=>$this->t('Fields'),
'#description'=>$this->t('Fields to be included as contextual links.'),
'#options'=>$field_options,
'#default_value'=>$this->options['fields'],
);
$form['destination']=array(
'#type'=>'select',
'#title'=>t('Include destination'),
'#description'=>t('Include a "destination" parameter in the link to return the user to the original view upon completing the contextual action.'),
'#title'=>$this->t('Include destination'),
'#description'=>$this->t('Include a "destination" parameter in the link to return the user to the original view upon completing the contextual action.'),
@@ -165,14 +165,14 @@ public function validate() {
// Verify that search fields are set up.
$style=$this->getOption('style');
if(!isset($style['options']['search_fields'])){
$errors[]=t('Display "@display" needs a selected search fields to work properly. See the settings for the Entity Reference list format.',array('@display'=>$this->display['display_title']));
$errors[]=$this->t('Display "@display" needs a selected search fields to work properly. See the settings for the Entity Reference list format.',array('@display'=>$this->display['display_title']));
}
else{
// Verify that the search fields used actually exist.
$errors[]=t('Display "@display" uses field %field as search field, but the field is no longer present. See the settings for the Entity Reference list format.',array('@display'=>$this->display['display_title'],'%field'=>$field_alias));
$errors[]=$this->t('Display "@display" uses field %field as search field, but the field is no longer present. See the settings for the Entity Reference list format.',array('@display'=>$this->display['display_title'],'%field'=>$field_alias));
@@ -43,7 +43,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form,$form_state);
// Expand the description of the 'Inline field' checkboxes.
$form['inline']['#description'].='<br />'.t("<strong>Note:</strong> In 'Entity Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here.");
$form['inline']['#description'].='<br />'.$this->t("<strong>Note:</strong> In 'Entity Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here.");
'#description'=>t('If checked, field api classes will be added by field templates. This is not recommended unless your CSS depends upon these classes. If not checked, template will not be used.'),
'#description'=>$this->t('If checked, field api classes will be added by field templates. This is not recommended unless your CSS depends upon these classes. If not checked, template will not be used.'),
'#fieldset'=>'style_settings',
'#weight'=>20,
);
if($this->multiple){
$form['field_api_classes']['#description'].=' '.t('Checking this option will cause the group Display Type and Separator values to be ignored.');
$form['field_api_classes']['#description'].=' '.$this->t('Checking this option will cause the group Display Type and Separator values to be ignored.');
}
// Get the currently selected formatter.
...
...
@@ -523,21 +523,21 @@ function multiple_options_form(&$form, FormStateInterface $form_state) {
$form['multiple_field_settings']=array(
'#type'=>'details',
'#title'=>t('Multiple field settings'),
'#title'=>$this->t('Multiple field settings'),
'#weight'=>5,
);
$form['group_rows']=array(
'#title'=>t('Display all values in the same row'),
'#title'=>$this->t('Display all values in the same row'),
'#type'=>'checkbox',
'#default_value'=>$this->options['group_rows'],
'#description'=>t('If checked, multiple values for this field will be shown in the same row. If not checked, each value in this field will create a new row. If using group by, please make sure to group by "Entity ID" for this setting to have any effect.'),
'#description'=>$this->t('If checked, multiple values for this field will be shown in the same row. If not checked, each value in this field will create a new row. If using group by, please make sure to group by "Entity ID" for this setting to have any effect.'),
'#fieldset'=>'multiple_field_settings',
);
// Make the string translatable by keeping it as a whole rather than