Issue #2353393 by tstoeckler: Use LanguageInterface::DIRECTION_LTR instead of 'ltr' directly.
parent
cd31649c66
commit
68f7879952
|
|
@ -10,6 +10,7 @@ namespace Drupal\Core\Render\Element;
|
|||
use Drupal\Component\Utility\NestedArray;
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
||||
/**
|
||||
* Provides a machine name render element.
|
||||
|
|
@ -131,7 +132,7 @@ class MachineName extends Textfield {
|
|||
if (!isset($element['#attributes'])) {
|
||||
$element['#attributes'] = array();
|
||||
}
|
||||
$element['#attributes'] += array('dir' => 'ltr');
|
||||
$element['#attributes'] += array('dir' => LanguageInterface::DIRECTION_LTR);
|
||||
|
||||
// The source element defaults to array('name'), but may have been overridden.
|
||||
if (empty($element['#machine_name']['source'])) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use Drupal\Component\Utility\Environment;
|
|||
use Drupal\Component\Utility\SafeMarkup;
|
||||
use Drupal\Component\Utility\String;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\Core\Render\Element\Textfield;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
|
|
@ -272,7 +273,7 @@ function color_scheme_form($complete_form, FormStateInterface $form_state, $them
|
|||
'#value_callback' => 'color_palette_color_value',
|
||||
'#default_value' => $value,
|
||||
'#size' => 8,
|
||||
'#attributes' => array('dir' => 'ltr'),
|
||||
'#attributes' => array('dir' => LanguageInterface::DIRECTION_LTR),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace Drupal\views\Plugin\views\display;
|
|||
|
||||
use Drupal\Core\Access\AccessManagerInterface;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\Core\Routing\UrlGeneratorTrait;
|
||||
use Drupal\Core\State\StateInterface;
|
||||
use Drupal\Core\Routing\RouteCompiler;
|
||||
|
|
@ -398,7 +399,7 @@ abstract class PathPluginBase extends DisplayPluginBase implements DisplayRouter
|
|||
'#default_value' => $this->getOption('path'),
|
||||
'#field_prefix' => '<span dir="ltr">' . $this->url('<none>', [], ['absolute' => TRUE]),
|
||||
'#field_suffix' => '</span>‎',
|
||||
'#attributes' => array('dir' => 'ltr'),
|
||||
'#attributes' => array('dir' => LanguageInterface::DIRECTION_LTR),
|
||||
// Account for the leading backslash.
|
||||
'#maxlength' => 254,
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue