You are here

public function HeartbeatController::userFilterFeed in Heartbeat 8

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

File

src/Controller/HeartbeatController.php, line 229

Class

HeartbeatController
Class HeartbeatController.

Namespace

Drupal\heartbeat\Controller

Code

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