public function Utility::faqAskUnansweredBlockBuild in FAQ_Ask 8
Helper function to get Build block.
This function construct block data for unanswered questions.
1 call to Utility::faqAskUnansweredBlockBuild()
- template_preprocess_faq_ask_unanswered_block in ./
faq_ask.module - Create list of unanswered questions for display in block.
File
- src/
Utility.php, line 370 - Contains \Drupal\faq_ask\Utility.
Class
- Utility
- Contains static helper functions for FAQ module.
Namespace
Drupal\faq_askCode
public function faqAskUnansweredBlockBuild(&$variables) {
$data = $variables['data'];
$mode = $variables['mode'];
$more_link = $variables['more_link'];
$items = array();
foreach ($data as $nid) {
$items[] = Utility::faqAskAnswerlink($nid, $mode);
}
$variables['items'] = $items;
if ($more_link) {
$variables['links']['title'] = 'more...';
$variables['links']['href'] = '/faq_ask/unanswered';
}
}