Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
use Drupal\Core\Render\Element;
|
||||
use Drupal\Core\Template\Attribute;
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
* Prepares variables for language negotiation configuration form.
|
||||
|
@ -94,55 +93,6 @@ function template_preprocess_language_negotiation_configure_form(&$variables) {
|
|||
$variables['children'] = $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Theme browser configuration form as table.
|
||||
*
|
||||
* @param $variables
|
||||
* An associative array containing:
|
||||
* - form: A render element representing the form.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
function theme_language_negotiation_configure_browser_form_table($variables) {
|
||||
$form = $variables['form'];
|
||||
$rows = array();
|
||||
foreach (Element::children($form, TRUE) as $key) {
|
||||
$row = array();
|
||||
$row[] = drupal_render($form[$key]['browser_langcode']);
|
||||
$row[] = drupal_render($form[$key]['drupal_langcode']);
|
||||
$links = array();
|
||||
$links['delete'] = array(
|
||||
'title' => t('Delete'),
|
||||
'url' => Url::fromRoute('language.negotiation_browser_delete', ['browser_langcode' => $key]),
|
||||
);
|
||||
$row[] = array(
|
||||
'data' => array(
|
||||
'#type' => 'operations',
|
||||
'#links' => $links,
|
||||
),
|
||||
);
|
||||
|
||||
$rows[] = $row;
|
||||
}
|
||||
|
||||
$header = array(
|
||||
t('Browser language code'),
|
||||
t('Site language'),
|
||||
t('Operations'),
|
||||
);
|
||||
|
||||
$table = array(
|
||||
'#type' => 'table',
|
||||
'#header' => $header,
|
||||
'#rows' => $rows,
|
||||
'#empty' => t('No browser language mappings available.'),
|
||||
'#attributes' => array('id' => 'language-negotiation-browser'),
|
||||
);
|
||||
$output = drupal_render($table);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for theme_language_content_settings_table().
|
||||
*/
|
||||
|
@ -201,5 +151,5 @@ function template_preprocess_language_content_settings_table(&$variables) {
|
|||
* @ingroup themeable
|
||||
*/
|
||||
function theme_language_content_settings_table($variables) {
|
||||
return '<h4>' . $variables['build']['#title'] . '</h4>' . drupal_render($variables['build']);
|
||||
return '<h4>' . theme_render_and_autoescape($variables['build']['#title']) . '</h4>' . theme_render_and_autoescape($variables['build']);
|
||||
}
|
||||
|
|
Reference in a new issue