Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -73,9 +73,9 @@ class BookController extends ControllerBase {
* A render array representing the administrative page content.
*/
public function adminOverview() {
$rows = array();
$rows = [];
$headers = array(t('Book'), t('Operations'));
$headers = [t('Book'), t('Operations')];
// Add any recognized books to the table list.
foreach ($this->bookManager->getAllBooks() as $book) {
/** @var \Drupal\Core\Url $url */
@ -83,28 +83,28 @@ class BookController extends ControllerBase {
if (isset($book['options'])) {
$url->setOptions($book['options']);
}
$row = array(
$row = [
$this->l($book['title'], $url),
);
$links = array();
$links['edit'] = array(
];
$links = [];
$links['edit'] = [
'title' => t('Edit order and titles'),
'url' => Url::fromRoute('book.admin_edit', ['node' => $book['nid']]),
);
$row[] = array(
'data' => array(
];
$row[] = [
'data' => [
'#type' => 'operations',
'#links' => $links,
),
);
],
];
$rows[] = $row;
}
return array(
return [
'#type' => 'table',
'#header' => $headers,
'#rows' => $rows,
'#empty' => t('No books available.'),
);
];
}
/**
@ -114,17 +114,17 @@ class BookController extends ControllerBase {
* A render array representing the listing of all books content.
*/
public function bookRender() {
$book_list = array();
$book_list = [];
foreach ($this->bookManager->getAllBooks() as $book) {
$book_list[] = $this->l($book['title'], $book['url']);
}
return array(
return [
'#theme' => 'item_list',
'#items' => $book_list,
'#cache' => [
'tags' => \Drupal::entityManager()->getDefinition('node')->getListCacheTags(),
],
);
];
}
/**