Skip to content
Snippets Groups Projects
Commit 5a07eb97 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1987400 by joelpittet, andypost, drupalninja99, jerdavis, CaptainWonky,...

Issue #1987400 by joelpittet, andypost, drupalninja99, jerdavis, CaptainWonky, shanethehat, TrevorBradley | Cottser: Forum.module - Convert theme_ functions to Twig.
parent 6aff7bdf
No related branches found
No related tags found
No related merge requests found
......@@ -96,9 +96,6 @@ function forum_theme() {
'template' => 'forum-submitted',
'variables' => array('topic' => NULL),
),
'forum_form' => array(
'render element' => 'form',
),
);
}
......@@ -739,19 +736,3 @@ function template_preprocess_forum_submitted(&$variables) {
}
$variables['time'] = isset($variables['topic']->created) ? \Drupal::service('date')->formatInterval(REQUEST_TIME - $variables['topic']->created) : '';
}
/**
* Returns HTML for a forum form.
*
* By default this does not alter the appearance of a form at all, but is
* provided as a convenience for themers.
*
* @param $variables
* An associative array containing:
* - form: A render element representing the form.
*
* @ingroup themeable
*/
function theme_forum_form(array $variables) {
return drupal_render_children($variables['form']);
}
......@@ -53,7 +53,7 @@ public function form(array $form, array &$form_state) {
$form['parent']['#tree'] = TRUE;
$form['parent'][0] = $this->forumParentSelect($taxonomy_term->id(), $this->t('Parent'));
$form['#theme'] = 'forum_form';
$form['#theme_wrappers'] = array('form__forum');
$this->forumFormType = $this->t('forum');
return $form;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment