Lines Matching refs:data

59         $data = array(
76 $data['header'] = $value;
81 $data['short'] = ($value == 'yes');
86 $data['showdate'] = ($value == 'yes');
91 $data['checkbox'] = ($value == 'yes');
96 $data['completed'] = ($value == 'yes');
101 $data['username'] = $value;
106 $data['assigned'] = ($value == 'yes');
110 $data['assigned'] = explode(',', $value);
112 if( in_array( '@@USER@@', $data['assigned'] ) ) {
113 $data['assigned'][] = '@@MAIL@@';
115 $data['assigned'] = array_map( array($this,"__todolistTrimUser"), $data['assigned'] );
118 $data['completeduserlist'] = explode(',', $value);
120 if(in_array('@@USER@@', $data['completeduserlist'])) {
121 $data['completeduserlist'][] = '@@MAIL@@';
123 $data['completeduserlist'] = array_map( array($this,"__todolistTrimUser"), $data['completeduserlist'] );
126 $data['ns'] = $value;
129 list($data['startbefore'], $data['startignore']) = $this->analyseDate($value);
132 list($data['startafter'], $data['startignore']) = $this->analyseDate($value);
135 list($data['startat'], $data['startignore']) = $this->analyseDate($value);
138 list($data['duebefore'], $data['dueignore']) = $this->analyseDate($value);
141 list($data['dueafter'], $data['dueignore']) = $this->analyseDate($value);
144 list($data['dueat'], $data['dueignore']) = $this->analyseDate($value);
147 list($data['completedbefore']) = $this->analyseDate($value);
150 list($data['completedafter']) = $this->analyseDate($value);
153 list($data['completedat']) = $this->analyseDate($value);
157 return $data;
165 * @param array $data The data from the handler() function
168 public function render($mode, Doku_Renderer $renderer, $data) {
175 $opts['ns'] = $data['ns'];
178 // search(&$data, $base, $func, $opts,$dir='',$lvl=1,$sort='natural')
181 $todopages = $this->filterpages($todopages, $data);
195 if($data['short']) {
196 $this->htmlShort($renderer, $todopages, $data);
198 $this->htmlTodoTable($renderer, $todopages, $data);
218 * @param array &$data - Reference to the result data structure
226 public function search_todos(&$data, $base, $file, $type, $lvl, $opts) {
249 $data[] = $item;
329 * @param $data array listing parameters
332 private function filterpages($todopages, $data) {
340 $todo = array_merge(array('todotitle' => trim($page['matches'][2][$todoindex]), 'todoindex' => $todoindex), $this->parseTodoArgs($todomatch), $data);
355 private function htmlShort($R, $todopages, $data) {
375 * @param array $data array with rendering options
377 private function htmlTodoTable($R, $todopages, $data) {
381 if ($data['header']!='none') {
384 $R->internallink(':'.$page['id'], ($data['header']=='firstheader' ? p_get_first_heading($page['id']) : $page['id']));
395 $R->doc .= $this->createTodoItem($R, $page['id'], array_merge($todo, $data));
406 * @param $data array the defined filters
411 private function isRequestedTodo($data) {
413 $condition1 = $data['completed'] === 'all' //all
414 || $data['completed'] === $data['checked']; //yes or no
418 if(isset($data['assigned']) && is_array($data['assigned'])) {
419 $requestedassignees = array_map( array($this,"__todolistExpandAssignees"), $data['assigned'] );
422 $condition2 = $data['assigned'] === 'all' //all
423 || (is_bool($data['assigned']) && $data['assigned'] == $data['todouser']); //yes or no
425 if (!$condition2 && isset($data['assigned']) && is_array($data['assigned']) && isset($data['todousers']) && is_array($data['todousers']))
426 foreach($data['todousers'] as $todouser) {
431 if($condition2 && isset($data['completeduserlist']) && is_array($data['completeduserlist']))
432 $condition2 = in_array($data['completeduser'], $data['completeduserlist']);
437 if(isset($data['startbefore']) || isset($data['startafter']) || isset($data['startat'])) {
438 if(isset($data['start'])) {
439 if($data['startignore'] != '!') {
440 if(isset($data['startbefore'])) { $condition3s = $condition3s && new DateTime($data['startbefore']) > $data['start']; }
441 if(isset($data['startafter'])) { $condition3s = $condition3s && new DateTime($data['startafter']) < $data['start']; }
442 if(isset($data['startat'])) { $condition3s = $condition3s && new DateTime($data['startat']) == $data['start']; }
445 if(!$data['startignore'] == '*') { $condition3s = false; }
446 if($data['startignore'] == '!') { $condition3s = false; }
450 if(isset($data['duebefore']) || isset($data['dueafter']) || isset($data['dueat'])) {
451 if(isset($data['due'])) {
452 if($data['dueignore'] != '!') {
453 if(isset($data['duebefore'])) { $condition3d = $condition3d && new DateTime($data['duebefore']) > $data['due']; }
454 if(isset($data['dueafter'])) { $condition3d = $condition3d && new DateTime($data['dueafter']) < $data['due']; }
455 if(isset($data['dueat'])) { $condition3d = $condition3d && new DateTime($data['dueat']) == $data['due']; }
458 if(!$data['dueignore'] == '*') { $condition3d = false; }
459 if($data['dueignore'] == '!') { $condition3d = false; }
467 if(isset($data['completedbefore'])) {
468 $condition4 = $condition4 && new DateTime($data['completedbefore']) > $data['completeddate'];
470 if(isset($data['completedafter'])) {
471 $condition4 = $condition4 && new DateTime($data['completedafter']) < $data['completeddate'];
473 if(isset($data['completedat'])) {
474 $condition4 = $condition4 && new DateTime($data['completedat']) == $data['completeddate'];