You are here

public function ForumTopicRender::preprocessForumLastTopicsBlock in Opigno forum 3.x

Prepares variables for opigno_forum_last_topics_block template.

File

src/ForumTopicRender.php, line 13

Class

ForumTopicRender
Forum topic render helper class.

Namespace

Drupal\opigno_forum

Code

public function preprocessForumLastTopicsBlock(array &$variables) : void {
  foreach ($variables["elements"]["topics"] as $index => $topic) {
    $variables["elements"]["topics"][$index] = [
      '#theme' => 'opigno_forum_last_topics_item',
      '#topic' => $topic,
    ];
  }
}