Media youtube, title description, CMS Info Content / Header Frontend

This commit is contained in:
Kevin Adametz 2019-12-12 20:01:01 +01:00
parent c9f3d85d4e
commit 7294ccc1d0
49 changed files with 1283 additions and 148 deletions

View file

@ -37,7 +37,7 @@ class HTMLHelper
private static $days = [
0 => 'Sonntag',
1=> 'Montag',
1 => 'Montag',
2 => 'Dienstag',
3 => 'Mittwoch',
4 => 'Donnerstag',
@ -45,6 +45,17 @@ class HTMLHelper
6 => 'Samstag',
];
public static $de_days = [
1 => 'Montag',
2 => 'Dienstag',
3 => 'Mittwoch',
4 => 'Donnerstag',
5 => 'Freitag',
6 => 'Samstag',
7 => 'Sonntag',
];
private static $roles = [
0 => 'Kunde',
@ -61,13 +72,19 @@ class HTMLHelper
public static function getMonth($i){
return self::$months[intval($i)];
return self::$months[$i];
}
public static function getDay($i){
return self::$days[intval($i)];
return self::$days[$i];
}
public static function getDeDays(){
return self::$de_days;
}
public static function getRoleLabel($role_id = 0, $pre = "", $post = ""){
return '<span class="badge badge-pill '.self::getLable($role_id).'">'.$pre.self::$roles[$role_id].$post.'</span>';
}
@ -130,6 +147,38 @@ class HTMLHelper
return $ret;
}
public static function createTimeRange($start = '0:00', $end = "23:30", $interval = '30 mins'){
$start_time = strtotime($start);
$end_time = strtotime($end);
$format = 'G:i';
$current = time();
$add_time = strtotime('+'.$interval, $current);
$diff = $add_time - $current;
$times = [];
while ($start_time < $end_time){
$times[] = date($format, $start_time);
$start_time += $diff;
}
$times[] = date($format, $start_time);
return $times;
}
public static function getTimeInSteps($id = false){
$times = self::createTimeRange();
$ret = '';
foreach ($times as $item){
$attr = ($item === $id) ? 'selected="selected"' : '';
$ret .= '<option value="'.$item.'" '.$attr.'>'.$item.'</option>\n';
}
return $ret;
}
public static function getRangeOptions($id = false, $range = 30, $name = "", $start=1){
$range = range($start, $range);