public function HeartbeatController::friendInteract in Heartbeat 8
1 string reference to 'HeartbeatController::friendInteract'
File
- src/
Controller/ HeartbeatController.php, line 268
Class
- HeartbeatController
- Class HeartbeatController.
Namespace
Drupal\heartbeat\ControllerCode
public function friendInteract($uid) {
$myConfig = \Drupal::service('config.factory')
->getEditable('heartbeat_friend_interact.settings');
$myConfig
->set('uid', $uid)
->save();
// $block = BlockViewBuilder::lazyBuilder('friendinteractblock', 'full');
$block = \Drupal::service('plugin.manager.block');
$block = $block
->createInstance('friend_interact_block')
->build();
$blockMarkup = \Drupal::service('renderer')
->render($block);
return [
'#type' => 'markup',
'#markup' => $blockMarkup,
];
}