public function execute(BlockContextInterface $blockContext, Response $response = null)
 {
     // merge settings
     $settings = $blockContext->getSettings();
     $hotCourses = \CourseManager::returnHotCourses();
     return $this->renderResponse($blockContext->getTemplate(), array('hot_courses' => $hotCourses, 'block' => $blockContext->getBlock(), 'settings' => $settings), $response);
 }
Beispiel #2
0
 /**
  * Returns a list of the most popular courses of the moment (also called
  * "hot courses").
  * @uses CourseManager::returnHotCourses() in fact, the current method is only a bypass to this method
  * @return string HTML <div> with the most popular courses
  * @assert () != ''
  */
 public function returnHotCourses()
 {
     return CourseManager::returnHotCourses();
 }