aboutsummaryrefslogtreecommitdiff
path: root/lib/calendar/CalendarWeekView.class.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /lib/calendar/CalendarWeekView.class.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/calendar/CalendarWeekView.class.php')
-rw-r--r--lib/calendar/CalendarWeekView.class.php124
1 files changed, 0 insertions, 124 deletions
diff --git a/lib/calendar/CalendarWeekView.class.php b/lib/calendar/CalendarWeekView.class.php
deleted file mode 100644
index c1e0f24..0000000
--- a/lib/calendar/CalendarWeekView.class.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-# Lifter010: TODO
-
-/**
- * CalendarWeekView.class.php - a specialized calendar view for displaying weeks
- *
- * This class takes and checks all necessary parameters to display a calendar/schedule/time-table.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * @author Till Glöggler <tgloeggl@uos.de> & Rasmus Fuhse <fuhse@data-quest.de>
- * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
- * @category Stud.IP
- */
-
-/**
- * Kind of bean class for the calendar view.
- *
- * @since 2.0
- *
- * @deprecated since Stud.IP 5.5
- */
-
-class CalendarWeekView extends CalendarView
-{
- protected $days = [1,2,3,4,5];
- protected $context;
-
-
- /**
- * You need to pass an instance of this class to the template. The constructor
- * expects an array of entries of the following type:
- * array(
- * $day_number => array(array (
- * 'color' => the color in hex (css-like, without the #)
- * 'start' => the (start hour * 100) + (start minute)
- * 'end' => the (end hour * 100) + (end minute)
- * //'day' => day of week (0 = Sunday, ... , 6 = Saturday)
- * 'title' => the entry`s title
- * 'content' => whatever shall be the content of the entry as a string
- * ) ...) ...
- * )
- *
- * @param mixed $entries an array of entries (see above)
- * @param string $controller the name of the controller. Used to create links.
- */
- public function __construct($entries, $controller)
- {
- parent::__construct($entries);
- $this->context = $controller;
- }
-
- /**
- * Call this function th enable/disable the grouping of entries with the same start and end.
- *
- * @param bool $group optional, defaults to true
- */
- public function groupEntries($grouped = true)
- {
- $this->grouped = $grouped;
- foreach($this->entries as $entry_column) {
- $entry_column->groupEntries();
- }
- }
-
- /* * * * * * * * * * * * * * *
- * * * G E T T E R S * * *
- * * * * * * * * * * * * * * */
-
- /**
- * @return mixed the context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * @return mixed the days
- */
- public function getDays()
- {
- return $this->days;
- }
-
- /**
- * returns the previously set javasscript insert-function only
- * if read_only is not set.
- *
- * @return string name of js-function or anonymous js-function
- */
- public function getInsertFunction() {
- if (!$this->read_only) {
- return parent::getInsertFunction();
- }
-
- return false;
- }
-
- /**
- * returns all columns of the calendar-view nad removes the url if
- * read_only is set
- *
- * @return array of CalendarColumn
- */
- public function getColumns() {
- // remove links and urls if calendar-view is read-only
- if ($this->read_only) {
- foreach ($this->entries as $column) {
- $column->setURL(false);
- foreach ($column->entries as $key => $entry) {
- unset($column->entries[$key]['url']);
- unset($column->entries[$key]['onClick']);
- unset($column->entries[$key]['icons']);
- }
- }
- }
-
- return parent::getColumns();
- }
-}