Skip to content

Commit

Permalink
馃挕 Adding some more php doc-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
micgro42 committed Aug 27, 2018
1 parent fbfa374 commit 9728bb6
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion syntax.php
Expand Up @@ -195,7 +195,19 @@ private function buildCalendar($opt)
return $cal;
}


/**
* Get the HTML for one table-row, representing one month
*
* @param $month
* @param $mth_num
* @param $opt
* @param $year_num
* @param $table_cols
* @param $first_weekday
* @param $today
*
* @return string
*/
protected function getMonthHTML(
$month,
$mth_num,
Expand Down Expand Up @@ -267,6 +279,8 @@ public function getDayHTML($cur_day, $mth_num, $today, $year_num, $weekday_num,
}

/**
* Determine if the given weekday should be printed or be an empty cell
*
* @param $weekday_num
* @param $opt
*
Expand All @@ -280,13 +294,25 @@ protected function isWeekdayToBePrinted($weekday_num, $opt)
return in_array($weekday_num, $opt['weekdays']);
}

/**
* Get the HTML for a header cell with the month name
*
* @param $mth_num
*
* @return string
*/
protected function getMonthNameHTML($mth_num)
{
$month_names = $this->getLang('yearbox_months');
$alt_css = ($mth_num % 2 == 0) ? ' class="alt"' : '';
return '<th' . $alt_css . '>' . $month_names[$mth_num - 1] . '</th>';
}

/**
* Get the HTML for an empty cell
*
* @return string
*/
protected function getEmptyCellHTML()
{
return '<td class="blank">&nbsp;&nbsp;&nbsp;</td>';
Expand Down

0 comments on commit 9728bb6

Please sign in to comment.