comparison core/modules/block_content/src/Controller/BlockContentController.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
101 * A form array as expected by 101 * A form array as expected by
102 * \Drupal\Core\Render\RendererInterface::render(). 102 * \Drupal\Core\Render\RendererInterface::render().
103 */ 103 */
104 public function addForm(BlockContentTypeInterface $block_content_type, Request $request) { 104 public function addForm(BlockContentTypeInterface $block_content_type, Request $request) {
105 $block = $this->blockContentStorage->create([ 105 $block = $this->blockContentStorage->create([
106 'type' => $block_content_type->id() 106 'type' => $block_content_type->id(),
107 ]); 107 ]);
108 if (($theme = $request->query->get('theme')) && in_array($theme, array_keys($this->themeHandler->listInfo()))) { 108 if (($theme = $request->query->get('theme')) && in_array($theme, array_keys($this->themeHandler->listInfo()))) {
109 // We have navigated to this page from the block library and will keep track 109 // We have navigated to this page from the block library and will keep track
110 // of the theme for redirecting the user to the configuration page for the 110 // of the theme for redirecting the user to the configuration page for the
111 // newly created block in the given theme. 111 // newly created block in the given theme.