comparison core/modules/book/src/Controller/BookController.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
152 public function bookExport($type, NodeInterface $node) { 152 public function bookExport($type, NodeInterface $node) {
153 $method = 'bookExport' . Container::camelize($type); 153 $method = 'bookExport' . Container::camelize($type);
154 154
155 // @todo Convert the custom export functionality to serializer. 155 // @todo Convert the custom export functionality to serializer.
156 if (!method_exists($this->bookExport, $method)) { 156 if (!method_exists($this->bookExport, $method)) {
157 drupal_set_message(t('Unknown export format.')); 157 $this->messenger()->addStatus(t('Unknown export format.'));
158 throw new NotFoundHttpException(); 158 throw new NotFoundHttpException();
159 } 159 }
160 160
161 $exported_book = $this->bookExport->{$method}($node); 161 $exported_book = $this->bookExport->{$method}($node);
162 return new Response($this->renderer->renderRoot($exported_book)); 162 return new Response($this->renderer->renderRoot($exported_book));