5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
29 $this->
user = $DIC->user();
30 $lng = $DIC->language();
35 $lng->loadLanguageModule(
"task");
46 return self::$block_type;
62 switch (
$_GET[
"cmd"]) {
76 $cmd =
$ilCtrl->getCmd(
"getHTML");
87 $collector = $DIC->task()->derived()->factory()->collector();
89 $this->tasks = $collector->getEntries($this->
user->getId());
91 if (count($this->tasks) > 0) {
93 $this->getListRowData();
94 parent::fillDataSection();
105 public function getListRowData()
110 foreach ($this->tasks as $task) {
112 "title" => $task->getTitle(),
113 "url" => $task->getUrl(),
114 "ref_id" => $task->getRefId(),
115 "wsp_id" => $task->getWspId(),
116 "deadline" => $task->getDeadline(),
117 "starting_time" => $task->getStartingTime()
132 $renderer = $DIC->ui()->renderer();
136 $info_screen->setFormAction(
"#");
137 $info_screen->addSection(
$lng->txt(
""));
140 $info_screen->addProperty(
141 $lng->txt(
"task_task"),
145 if ($a_set[
"ref_id"] > 0) {
149 if (0 === $a_set[
'url']) {
152 $url = $a_set[
'url'];
156 $info_screen->addProperty(
157 $lng->txt(
"obj_" . $obj_type),
158 $renderer->render($link)
162 if ($a_set[
"wsp_id"] > 0) {
167 if (0 === $a_set[
'url']) {
170 $url = $a_set[
'url'];
174 $info_screen->addProperty(
175 $lng->txt(
"obj_" . $obj_type),
176 $renderer->render($link)
180 if ($a_set[
"starting_time"] > 0) {
182 $info_screen->addProperty(
183 $lng->txt(
"task_start"),
188 if ($a_set[
"deadline"] > 0) {
190 $info_screen->addProperty(
191 $lng->txt(
"task_deadline"),
196 $modal =
$factory->modal()->roundtrip(
197 $lng->txt(
"task_details"),
198 $factory->legacy($info_screen->getHTML())
200 ->withCancelButtonLabel(
"close");
201 $button1 =
$factory->button()->shy($a_set[
"title"],
'#')
202 ->withOnClick($modal->getShowSignal());
204 $this->tpl->setVariable(
"TITLE", $renderer->render([$button1, $modal]));
214 return '<div class="small">' . ((int) count($this->tasks)) .
" " .
$lng->txt(
"task_derived_tasks") .
"</div>";
229 $collector = $DIC->task()->derived()->factory()->collector();
231 $this->tasks = $collector->getEntries($this->
user->getId());
233 $this->getListRowData();
235 return parent::getHTMLNew();
249 if ($data[
"ref_id"] > 0) {
252 if ($data[
'url'] ==
"") {
262 if ($data[
"wsp_id"] > 0) {
266 if ($data[
'url'] ==
"") {
276 if ($data[
"starting_time"] > 0) {
283 ->withProperties($props);
285 if ($data[
"deadline"] > 0) {
303 return $this->lng->txt(
"task_no_task_items");
__construct()
Constructor.
fillDataSection()
Fill data section.
static getScreenMode()
Get Screen Mode for current command.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
Class ChatMainBarProvider .
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
executeCommand()
execute command
getListItemForData(array $data)
static _lookupTitle($a_id)
lookup object title
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
BlockGUI class for Tasks on PD.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
Tree handler for personal workspace.
getNoItemFoundContent()
No item entry.
fillRow($a_set)
get flat list for personal desktop
setTitle($a_title)
Set Title.
setData($a_data)
Set Data.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
setLimit($a_limit)
Set Limit.
__construct(Container $dic, ilPlugin $plugin)
lookupObjectId($a_node_id)
Get object id for node id.
getOverview()
Get overview.
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setPresentation(int $type)
Set presentation.