You are here

public function HeartbeatController::updateFeed in Heartbeat 8

1 string reference to 'HeartbeatController::updateFeed'
heartbeat.routing.yml in ./heartbeat.routing.yml
heartbeat.routing.yml

File

src/Controller/HeartbeatController.php, line 207

Class

HeartbeatController
Class HeartbeatController.

Namespace

Drupal\heartbeat\Controller

Code

public function updateFeed($hid) {
  $myConfig = \Drupal::service('config.factory')
    ->getEditable('heartbeat_more.settings');
  $myConfig
    ->set('hid', $hid)
    ->save();
  $block = $this->blockManager
    ->createInstance('heartbeat_more_block')
    ->build();
  return [
    '#type' => 'markup',
    '#markup' => $this->renderer
      ->render($block),
  ];
}