tripal_chado_views.DEPRECATED.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <?php
  2. /**
  3. * @file
  4. * Wrapper functions to provide backwards compatibility for the tripal analysis
  5. * api
  6. */
  7. /**
  8. * @deprecated Restructured API to make naming more readable and consistent.
  9. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  10. * now. This function has been replaced by tripal_enable_view().
  11. *
  12. * @see tripal_enable_view().
  13. */
  14. function tripal_chado_views_admin_enable_view($view_name, $redirect_link) {
  15. tripal_report_error(
  16. 'tripal_deprecated',
  17. TRIPAL_NOTICE,
  18. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  19. [
  20. '%old_function' => 'tripal_views_admin_enable_view',
  21. '%new_function' => 'tripal_enable_view',
  22. ]
  23. );
  24. return tripal_enable_view($view_name, $redirect_link);
  25. }
  26. /**
  27. * @deprecated Restructured API to make naming more readable and consistent.
  28. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  29. * now. This function has been replaced by tripal_disable_view().
  30. *
  31. * @see tripal_disable_view().
  32. */
  33. function tripal_chado_views_admin_disable_view($view_name, $redirect_link) {
  34. tripal_report_error(
  35. 'tripal_deprecated',
  36. TRIPAL_NOTICE,
  37. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  38. [
  39. '%old_function' => 'tripal_views_admin_disable_view',
  40. '%new_function' => 'tripal_disable_view',
  41. ]
  42. );
  43. return tripal_disable_view($view_name, $redirect_link);
  44. }
  45. /**
  46. * @deprecated Restructured API to make naming more readable and consistent.
  47. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  48. * now. This function has been replaced by
  49. * tripal_make_view_compatible_with_external().
  50. *
  51. * @see tripal_make_view_compatible_with_external().
  52. */
  53. function tripal_chado_views_make_view_compatible_with_external($view) {
  54. tripal_report_error(
  55. 'tripal_deprecated',
  56. TRIPAL_NOTICE,
  57. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  58. [
  59. '%old_function' => 'tripal_views_make_view_compatible_with_external',
  60. '%new_function' => 'tripal_make_view_compatible_with_external',
  61. ]
  62. );
  63. return tripal_make_view_compatible_with_external($view);
  64. }
  65. /**
  66. * @deprecated Restructured API to make naming more readable and consistent.
  67. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  68. * now. This function has been replaced by
  69. * tripal_get_lightest_views_integration_priority().
  70. *
  71. * @see tripal_get_lightest_views_integration_priority().
  72. */
  73. function tripal_chado_views_get_table_lightest_priority($table_name) {
  74. tripal_report_error(
  75. 'tripal_deprecated',
  76. TRIPAL_NOTICE,
  77. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  78. [
  79. '%old_function' => 'tripal_views_get_table_lightest_priority',
  80. '%new_function' => 'tripal_get_lightest_views_integration_priority',
  81. ]
  82. );
  83. return tripal_get_lightest_views_integration_priority($table_name);
  84. }
  85. /**
  86. * @deprecated Restructured API to make naming more readable and consistent.
  87. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  88. * now. This function has been replaced by
  89. * tripal_get_lightest_views_integration_setup().
  90. *
  91. * @see tripal_get_lightest_views_integration_setup().
  92. */
  93. function tripal_chado_views_get_lightest_priority_setup($table_name) {
  94. tripal_report_error(
  95. 'tripal_deprecated',
  96. TRIPAL_NOTICE,
  97. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  98. [
  99. '%old_function' => 'tripal_views_get_lightest_priority_setup',
  100. '%new_function' => 'tripal_get_lightest_views_integration_setup',
  101. ]
  102. );
  103. return tripal_get_lightest_views_integration_setup($table_name);
  104. }
  105. /**
  106. * @deprecated Restructured API to make naming more readable and consistent.
  107. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  108. * now. This function has been replaced by
  109. * tripal_get_views_integration_setup_id().
  110. *
  111. * @see tripal_get_views_integration_setup_id().
  112. */
  113. function tripal_chado_views_get_setup_id($table_name, $priority) {
  114. tripal_report_error(
  115. 'tripal_deprecated',
  116. TRIPAL_NOTICE,
  117. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  118. [
  119. '%old_function' => 'tripal_views_get_setup_id',
  120. '%new_function' => 'tripal_get_views_integration_setup_id',
  121. ]
  122. );
  123. return tripal_get_views_integration_setup_id($table_name, $priority);
  124. }
  125. /**
  126. * @deprecated Restructured API to make naming more readable and consistent.
  127. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  128. * now. This function has been replaced by tripal_is_table_integrated().
  129. *
  130. * @see tripal_is_table_integrated().
  131. */
  132. function tripal_chado_views_is_integrated($table_name, $priority = NULL) {
  133. tripal_report_error(
  134. 'tripal_deprecated',
  135. TRIPAL_NOTICE,
  136. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  137. [
  138. '%old_function' => 'tripal_views_is_integrated',
  139. '%new_function' => 'tripal_is_table_integrated',
  140. ]
  141. );
  142. return tripal_is_table_integrated($table_name, $priority);
  143. }
  144. /**
  145. * @deprecated Restructured API to make naming more readable and consistent.
  146. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  147. * now. This function has been replaced by
  148. * tripal_is_lightest_priority_setup().
  149. *
  150. * @see tripal_is_lightest_priority_setup().
  151. */
  152. function tripal_chado_views_is_lightest_priority_setup($setup_id, $table_name) {
  153. tripal_report_error(
  154. 'tripal_deprecated',
  155. TRIPAL_NOTICE,
  156. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  157. [
  158. '%old_function' => 'tripal_views_is_lightest_priority_setup',
  159. '%new_function' => 'tripal_is_lightest_priority_setup',
  160. ]
  161. );
  162. return tripal_is_lightest_priority_setup($setup_id, $table_name);
  163. }
  164. /**
  165. * @deprecated Restructured API to make naming more readable and consistent.
  166. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  167. * now. This function has been replaced by
  168. * tripal_rebuild_views_integrations().
  169. *
  170. * @see tripal_rebuild_views_integrations().
  171. */
  172. function tripal_chado_views_rebuild_views_integrations($delete_first = FALSE) {
  173. tripal_report_error(
  174. 'tripal_deprecated',
  175. TRIPAL_NOTICE,
  176. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  177. [
  178. '%old_function' => 'tripal_views_rebuild_views_integrations',
  179. '%new_function' => 'tripal_rebuild_views_integrations',
  180. ]
  181. );
  182. return tripal_rebuild_views_integrations($delete_first);
  183. }
  184. /**
  185. * @deprecated Restructured API to make naming more readable and consistent.
  186. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  187. * now. This function has been replaced by tripal_add_views_integration().
  188. *
  189. * @see tripal_add_views_integration().
  190. */
  191. function tripal_chado_views_integration_add_entry($defn_array, $setup_id = FALSE) {
  192. tripal_report_error(
  193. 'tripal_deprecated',
  194. TRIPAL_NOTICE,
  195. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  196. [
  197. '%old_function' => 'tripal_views_integration_add_entry',
  198. '%new_function' => 'tripal_add_views_integration',
  199. ]
  200. );
  201. return tripal_add_views_integration($defn_array, $setup_id);
  202. }
  203. /**
  204. * @deprecated Restructured API to make naming more readable and consistent.
  205. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  206. * now. This function has been replaced by tripal_export_views_integration().
  207. *
  208. * @see tripal_export_views_integration().
  209. */
  210. function tripal_chado_views_integration_export_entry($setup_id) {
  211. tripal_report_error(
  212. 'tripal_deprecated',
  213. TRIPAL_NOTICE,
  214. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  215. [
  216. '%old_function' => 'tripal_views_integration_export_entry',
  217. '%new_function' => 'tripal_export_views_integration',
  218. ]
  219. );
  220. return tripal_export_views_integration($setup_id);
  221. }
  222. /**
  223. * @deprecated Restructured API to make naming more readable and consistent.
  224. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  225. * now. This function has been replaced by tripal_remove_views_integration().
  226. *
  227. * @see tripal_remove_views_integration().
  228. */
  229. function tripal_chado_views_integration_remove_entry_by_table_name($table_name, $priority) {
  230. tripal_report_error(
  231. 'tripal_deprecated',
  232. TRIPAL_NOTICE,
  233. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  234. [
  235. '%old_function' => 'tripal_views_integration_remove_entry_by_table_name',
  236. '%new_function' => 'tripal_remove_views_integration',
  237. ]
  238. );
  239. return tripal_remove_views_integration([
  240. 'table_name' => $table_name,
  241. 'priority' => $priority,
  242. ]);
  243. }
  244. /**
  245. * @deprecated Restructured API to make naming more readable and consistent.
  246. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  247. * now. This function has been replaced by tripal_remove_views_integration().
  248. *
  249. * @see tripal_remove_views_integration().
  250. */
  251. function tripal_chado_views_integration_remove_entry_by_setup_id($setup_id) {
  252. tripal_report_error(
  253. 'tripal_deprecated',
  254. TRIPAL_NOTICE,
  255. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  256. [
  257. '%old_function' => 'tripal_views_integration_remove_entry_by_setup_id',
  258. '%new_function' => 'tripal_remove_views_integration',
  259. ]
  260. );
  261. return tripal_remove_views_integration(['setup_id' => $setup_id]);
  262. }
  263. /**
  264. * @deprecated Restructured API to make naming more readable and consistent.
  265. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  266. * now. This function has been replaced by tripal_update_views_integration().
  267. *
  268. * @see tripal_update_views_integration().
  269. */
  270. function tripal_chado_views_integration_update_entry($setup_id, $defn_array) {
  271. tripal_report_error(
  272. 'tripal_deprecated',
  273. TRIPAL_NOTICE,
  274. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  275. [
  276. '%old_function' => 'tripal_views_integration_update_entry',
  277. '%new_function' => 'tripal_update_views_integration',
  278. ]
  279. );
  280. return tripal_update_views_integration($setup_id, $defn_array);
  281. }
  282. /**
  283. * @deprecated Restructured API to make naming more readable and consistent.
  284. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  285. * now. This function has been replaced by tripal_clone_views_integration().
  286. *
  287. * @see tripal_clone_views_integration().
  288. */
  289. function tripal_chado_views_clone_integration($table_name, $new_priority = NULL, $template_priority = NULL) {
  290. tripal_report_error(
  291. 'tripal_deprecated',
  292. TRIPAL_NOTICE,
  293. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  294. [
  295. '%old_function' => 'tripal_views_clone_integration',
  296. '%new_function' => 'tripal_clone_views_integration',
  297. ]
  298. );
  299. return tripal_clone_views_integration($table_name, $new_priority, $template_priority);
  300. }
  301. /**
  302. * @deprecated Restructured API to make naming more readable and consistent.
  303. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  304. * now. This function has been replaced by
  305. * tripal_add_field_to_views_integration().
  306. *
  307. * @see tripal_add_field_to_views_integration().
  308. */
  309. function tripal_chado_views_add_field_to_integration($table_name, $priority, $field) {
  310. tripal_report_error(
  311. 'tripal_deprecated',
  312. TRIPAL_NOTICE,
  313. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  314. [
  315. '%old_function' => 'tripal_views_add_field_to_integration',
  316. '%new_function' => 'tripal_add_field_to_views_integration',
  317. ]
  318. );
  319. return tripal_add_field_to_views_integration($table_name, $priority, $field);
  320. }
  321. /**
  322. * @deprecated Restructured API to make naming more readable and consistent.
  323. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from
  324. * now. This function has been replaced by
  325. * tripal_remove_join_from_views_integration().
  326. *
  327. * @see tripal_remove_join_from_views_integration().
  328. */
  329. function tripal_chado_views_remove_join_from_integration($setup_id, $base_table, $base_field, $left_table, $left_field) {
  330. tripal_report_error(
  331. 'tripal_deprecated',
  332. TRIPAL_NOTICE,
  333. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  334. [
  335. '%old_function' => 'tripal_views_remove_join_from_integration',
  336. '%new_function' => 'tripal_remove_join_from_views_integration',
  337. ]
  338. );
  339. return tripal_remove_join_from_views_integration($setup_id, $base_table, $base_field, $left_table, $left_field);
  340. }