Ejemplo n.º 1
0
 private function getDaysList($lessons_array, $week)
 {
     $items = array();
     for ($day = 1; $day <= $this->days; $day++) {
         $dayTitle = Html::tag('th', Lesson::getDayName($day), ['class' => 'center-align grey-color', 'colspan' => '5']);
         $items[] = Html::tag('tr', $dayTitle);
         $lesson = new Lesson();
         foreach ($this->attributes as $attr) {
             $label = $lesson->getAttributeLabel($attr);
             $items[] = Html::tag('th', $label, ['class' => 'center-align']);
         }
         $items[] = $this->getLessonsList($lessons_array, $this->week, $day);
     }
     return Html::tag('tr', implode("\n", $items));
 }