Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
PU_data_dcp_autocompletion.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package Dcp\Pu
5 */
6 
8 {
9  return array(
10  0 => array(
11  "mineure",
12  "Mi"
13  ) ,
14  1 => array(
15  "majeure",
16  "Ma"
17  ) ,
18  2 => array(
19  "bloquante",
20  "Bl"
21  )
22  );
23 }
24 
26 {
27  return PU_data_dcp_autocompletion_getTitle_fam_title($dbaccess, "TST_AUTOCOMPLETION", $title);
28 }
29 
31 {
32  if (!is_numeric($famId)) {
33  $famName = $famId;
35  if ($famId <= 0) {
36  throw new Exception(sprintf("Family %s not found", $famName));
37  }
38  }
39  $s = new SearchDoc($dbaccess, $famId);
40  $s->setObjectReturn();
41  $s->search();
42  $ret = array();
43  while ($doc = $s->getNextDoc()) {
44  if (strlen($title) > 0 && strpos($doc->getTitle() , $title) === false) {
45  continue;
46  }
47  $ret[] = array(
48  $doc->getTitle() ,
49  $doc->getTitle()
50  );
51  }
52  return $ret;
53 }
54 
56 {
58 }
59 
61 {
62  return array(
63  array(
64  "$text, $ct",
65  "$text, $ct"
66  )
67  );
68 }
69 
71 {
72  return array(
73  array(
74  "$ct, $text",
75  "$ct, $text"
76  )
77  );
78 }
79 
80 function PU_data_dcp_autocompletion_relation_2($ct_r1, $ct, $s_text)
81 {
82  return array(
83  array(
84  "$ct, $ct_r1, $s_text",
85  "$ct, $ct_r1, $s_text"
86  )
87  );
88 }
89 
90 function PU_data_dcp_autocompletion_relation_3($s_text, $ct, $ct_r1)
91 {
92  return array(
93  array(
94  "$s_text, $ct, $ct_r1",
95  "$s_text, $ct, $ct_r1"
96  )
97  );
98 }
99 
100 function PU_data_dcp_autocompletion_global_param($paramName, $paramValue)
101 {
102  $expectedValue = getParam($paramName);
103  return array(
104  array(
105  ($paramValue == $expectedValue) ? 'OK' : sprintf("Got '%s' instead of '%s' for notation '{%s}'.", $paramValue, $expectedValue, $paramName)
106  )
107  );
108 }
109 
110 function PU_data_dcp_autocompletion_defaultphpfunc($dbaccess, $ct, $relation_1, $relation_2, $relation_3)
111 {
112  return array(
113  array(
114  "defaultphpfunc",
115  "defaultphpfunc"
116  )
117  );
118 }
PU_data_dcp_autocompletion_relation_2($ct_r1, $ct, $s_text)
PU_data_dcp_autocompletion_getTitle_fam_title($dbaccess, $famId, $title)
PU_data_dcp_autocompletion_relation_3($s_text, $ct, $ct_r1)
PU_data_dcp_autocompletion_bug_2108_ok($text, $ct)
PU_data_dcp_autocompletion_bug_2108($ct, $text)
$ret
if($famId) $s
getParam($name, $def="")
must be in core or global type
Definition: Lib.Common.php:193
PU_data_dcp_autocompletion_getGravite()
PU_data_dcp_autocompletion_getTitle_reverse_fam_title($title, $famId, $dbaccess)
PU_data_dcp_autocompletion_defaultphpfunc($dbaccess, $ct, $relation_1, $relation_2, $relation_3)
$dbaccess
Definition: checkVault.php:17
getIdFromName($dbaccess, $name)
PU_data_dcp_autocompletion_getTitle_title($dbaccess, $title)
PU_data_dcp_autocompletion_global_param($paramName, $paramValue)
← centre documentaire © anakeen