tripal_cv.views.inc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the basic functions for views integration of
  5. * chado/tripal db tables. Supplementary functions can be found in
  6. * ./views/
  7. *
  8. * Documentation on views integration can be found at
  9. * http://views2.logrus.com/doc/html/index.html.
  10. */
  11. /**
  12. * @defgroup tripal_cv_views Controlled Vocabulary Views Integration
  13. * @ingroup views
  14. * @ingroup tripal_cv
  15. */
  16. /**
  17. * Implements hook_views_data()
  18. *
  19. * Purpose: Describe chado/tripal tables & fields to views
  20. *
  21. * @return
  22. * a data array which follows the structure outlined in the
  23. * views2 documentation for this hook. Essentially, it's an array of table
  24. * definitions keyed by chado/tripal table name. Each table definition
  25. * includes basic details about the table, fields in that table and
  26. * relationships between that table and others (joins)
  27. *
  28. * @ingroup tripal_cv_views
  29. */
  30. function tripal_cv_views_data() {
  31. $data = array();
  32. if (module_exists('tripal_views')) {
  33. // Base Tables
  34. $tables = array(
  35. 'cv',
  36. 'cvterm'
  37. );
  38. foreach ($tables as $tablename) {
  39. // get the setup with the lightest priority. That's the table
  40. // that currently integrated with views.
  41. $priority = tripal_views_get_table_lightest_priority($tablename);
  42. // check to see if the table is integrated. If it is then integrate it's
  43. // corresponding 'chado_[table]' table.
  44. if (!tripal_views_is_integrated($tablename, $priority)) {
  45. // get default integration array
  46. $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE, $priority);
  47. // add specialty handlers
  48. if ($tablename == 'cvterm') {
  49. $table_integration_array['fields']['name']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_string';
  50. }
  51. elseif ($tablename == 'cv') {
  52. $table_integration_array['fields']['name']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_string';
  53. }
  54. // add integration
  55. tripal_views_integration_add_entry($table_integration_array);
  56. }
  57. }
  58. // Additional Tables
  59. $tables = array(
  60. 'cvterm_dbxref',
  61. 'cvterm_relationship',
  62. 'cvtermpath',
  63. 'cvtermprop',
  64. 'cvtermsynonym'
  65. );
  66. foreach ($tables as $tablename) {
  67. $priority = tripal_views_get_table_lightest_priority($tablename);
  68. if (!tripal_views_is_integrated($tablename, $priority)) {
  69. $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, FALSE, $priority);
  70. tripal_views_integration_add_entry($table_integration_array);
  71. }
  72. }
  73. }
  74. return $data;
  75. }
  76. /**
  77. * Implements hook_views_handlers()
  78. *
  79. * Purpose: Register all custom handlers with views
  80. * where a handler describes either "the type of field",
  81. * "how a field should be filtered", "how a field should be sorted"
  82. *
  83. * @return: An array of handler definitions
  84. *
  85. * @ingroup tripal_cv_views
  86. */
  87. function tripal_cv_views_handlers() {
  88. return array(
  89. 'info' => array(
  90. 'path' => drupal_get_path('module', 'tripal_cv') . '/views/handlers',
  91. ),
  92. 'handlers' => array(
  93. 'views_handler_field_tf_boolean' => array(
  94. 'parent' => 'views_handler_field',
  95. ),
  96. ),
  97. );
  98. }
  99. /**
  100. *
  101. * @ingroup tripal_cv_views
  102. */
  103. function tripal_cv_views_default_views() {
  104. $views = array();
  105. if (!module_exists('tripal_views')) {
  106. return $views;
  107. }
  108. // Main default view
  109. // List all cvterms based on cv
  110. $view = new view;
  111. $view->name = 'cvterm_listing';
  112. $view->description = 'A listing of all controlled vocabulary terms filtered by controlled vocabulary';
  113. $view->tag = 'chado default';
  114. $view->base_table = 'cvterm';
  115. $view->core = 0;
  116. $view->api_version = '2';
  117. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  118. $handler = $view->new_display('default', 'Defaults', 'default');
  119. $handler->override_option('fields', array(
  120. 'name_1' => array(
  121. 'label' => 'Vocabulary',
  122. 'alter' => array(
  123. 'alter_text' => 0,
  124. 'text' => '',
  125. 'make_link' => 0,
  126. 'path' => '',
  127. 'absolute' => 0,
  128. 'link_class' => '',
  129. 'alt' => '',
  130. 'rel' => '',
  131. 'prefix' => '',
  132. 'suffix' => '',
  133. 'target' => '',
  134. 'help' => '',
  135. 'trim' => 0,
  136. 'max_length' => '',
  137. 'word_boundary' => 1,
  138. 'ellipsis' => 1,
  139. 'html' => 0,
  140. 'strip_tags' => 0,
  141. ),
  142. 'empty' => '',
  143. 'hide_empty' => 0,
  144. 'empty_zero' => 0,
  145. 'hide_alter_empty' => 1,
  146. 'type' => 'separator',
  147. 'separator' => ', ',
  148. 'exclude' => 0,
  149. 'id' => 'name_1',
  150. 'table' => 'cv',
  151. 'field' => 'name',
  152. 'relationship' => 'none',
  153. ),
  154. 'name' => array(
  155. 'label' => 'Name',
  156. 'alter' => array(
  157. 'alter_text' => 0,
  158. 'text' => '',
  159. 'make_link' => 0,
  160. 'path' => '',
  161. 'link_class' => '',
  162. 'alt' => '',
  163. 'prefix' => '',
  164. 'suffix' => '',
  165. 'target' => '',
  166. 'help' => '',
  167. 'trim' => 0,
  168. 'max_length' => '',
  169. 'word_boundary' => 1,
  170. 'ellipsis' => 1,
  171. 'html' => 0,
  172. 'strip_tags' => 0,
  173. ),
  174. 'empty' => '',
  175. 'hide_empty' => 0,
  176. 'empty_zero' => 0,
  177. 'exclude' => 0,
  178. 'id' => 'name',
  179. 'table' => 'cvterm',
  180. 'field' => 'name',
  181. 'relationship' => 'none',
  182. ),
  183. 'definition' => array(
  184. 'label' => 'Definition',
  185. 'alter' => array(
  186. 'alter_text' => 0,
  187. 'text' => '',
  188. 'make_link' => 0,
  189. 'path' => '',
  190. 'link_class' => '',
  191. 'alt' => '',
  192. 'prefix' => '',
  193. 'suffix' => '',
  194. 'target' => '',
  195. 'help' => '',
  196. 'trim' => 0,
  197. 'max_length' => '',
  198. 'word_boundary' => 1,
  199. 'ellipsis' => 1,
  200. 'html' => 0,
  201. 'strip_tags' => 0,
  202. ),
  203. 'empty' => '',
  204. 'hide_empty' => 0,
  205. 'empty_zero' => 0,
  206. 'exclude' => 0,
  207. 'id' => 'definition',
  208. 'table' => 'cvterm',
  209. 'field' => 'definition',
  210. 'relationship' => 'none',
  211. ),
  212. 'is_obsolete' => array(
  213. 'label' => 'Is Obsolete',
  214. 'alter' => array(
  215. 'alter_text' => 0,
  216. 'text' => '',
  217. 'make_link' => 0,
  218. 'path' => '',
  219. 'link_class' => '',
  220. 'alt' => '',
  221. 'prefix' => '',
  222. 'suffix' => '',
  223. 'target' => '',
  224. 'help' => '',
  225. 'trim' => 0,
  226. 'max_length' => '',
  227. 'word_boundary' => 1,
  228. 'ellipsis' => 1,
  229. 'html' => 0,
  230. 'strip_tags' => 0,
  231. ),
  232. 'empty' => '',
  233. 'hide_empty' => 0,
  234. 'empty_zero' => 0,
  235. 'type' => 'yes-no',
  236. 'not' => 0,
  237. 'exclude' => 0,
  238. 'id' => 'is_obsolete',
  239. 'table' => 'cvterm',
  240. 'field' => 'is_obsolete',
  241. 'relationship' => 'none',
  242. ),
  243. 'is_relationshiptype' => array(
  244. 'label' => 'Is Relationship',
  245. 'alter' => array(
  246. 'alter_text' => 0,
  247. 'text' => '',
  248. 'make_link' => 0,
  249. 'path' => '',
  250. 'link_class' => '',
  251. 'alt' => '',
  252. 'prefix' => '',
  253. 'suffix' => '',
  254. 'target' => '',
  255. 'help' => '',
  256. 'trim' => 0,
  257. 'max_length' => '',
  258. 'word_boundary' => 1,
  259. 'ellipsis' => 1,
  260. 'html' => 0,
  261. 'strip_tags' => 0,
  262. ),
  263. 'empty' => '',
  264. 'hide_empty' => 0,
  265. 'empty_zero' => 0,
  266. 'type' => 'yes-no',
  267. 'not' => 0,
  268. 'exclude' => 0,
  269. 'id' => 'is_relationshiptype',
  270. 'table' => 'cvterm',
  271. 'field' => 'is_relationshiptype',
  272. 'relationship' => 'none',
  273. ),
  274. ));
  275. $handler->override_option('sorts', array(
  276. 'name' => array(
  277. 'order' => 'ASC',
  278. 'id' => 'name',
  279. 'table' => 'cv',
  280. 'field' => 'name',
  281. 'relationship' => 'none',
  282. ),
  283. 'name_1' => array(
  284. 'order' => 'ASC',
  285. 'id' => 'name_1',
  286. 'table' => 'cvterm',
  287. 'field' => 'name',
  288. 'relationship' => 'none',
  289. ),
  290. ));
  291. $handler->override_option('filters', array(
  292. 'name' => array(
  293. 'operator' => '=',
  294. 'value' => array(),
  295. 'group' => '0',
  296. 'exposed' => TRUE,
  297. 'expose' => array(
  298. 'use_operator' => 0,
  299. 'operator' => 'name_op',
  300. 'identifier' => 'cv',
  301. 'label' => 'Vocabulary',
  302. 'remember' => 0,
  303. ),
  304. 'case' => 1,
  305. 'id' => 'name',
  306. 'table' => 'cv',
  307. 'field' => 'name',
  308. 'relationship' => 'none',
  309. 'values_form_type' => 'select',
  310. 'multiple' => 1,
  311. 'optional' => 0,
  312. 'agg' => array(
  313. 'records_with' => 1,
  314. 'aggregates_with' => 1,
  315. ),
  316. ),
  317. 'name_1' => array(
  318. 'operator' => 'contains',
  319. 'value' => '',
  320. 'group' => '0',
  321. 'exposed' => TRUE,
  322. 'expose' => array(
  323. 'use_operator' => 0,
  324. 'operator' => '',
  325. 'identifier' => 'name',
  326. 'label' => 'Name Contains',
  327. 'remember' => 0,
  328. ),
  329. 'case' => 0,
  330. 'id' => 'name_1',
  331. 'table' => 'cvterm',
  332. 'field' => 'name',
  333. 'relationship' => 'none',
  334. 'values_form_type' => 'textfield',
  335. 'multiple' => 0,
  336. 'optional' => 0,
  337. 'show_all' => 0,
  338. 'agg' => array(
  339. 'records_with' => 1,
  340. 'aggregates_with' => 1,
  341. ),
  342. ),
  343. 'definition' => array(
  344. 'operator' => 'contains',
  345. 'value' => '',
  346. 'group' => '0',
  347. 'exposed' => TRUE,
  348. 'expose' => array(
  349. 'use_operator' => 0,
  350. 'operator' => 'definition_op',
  351. 'identifier' => 'definition',
  352. 'label' => 'Definition Contains',
  353. 'remember' => 0,
  354. ),
  355. 'case' => 0,
  356. 'id' => 'definition',
  357. 'table' => 'cvterm',
  358. 'field' => 'definition',
  359. 'relationship' => 'none',
  360. 'agg' => array(
  361. 'records_with' => 1,
  362. 'aggregates_with' => 0,
  363. ),
  364. ),
  365. 'search_results' => array(
  366. 'operator' => '=',
  367. 'value' => '',
  368. 'group' => '0',
  369. 'exposed' => FALSE,
  370. 'expose' => array(
  371. 'operator' => FALSE,
  372. 'label' => '',
  373. ),
  374. 'id' => 'search_results',
  375. 'table' => 'views',
  376. 'field' => 'search_results',
  377. 'relationship' => 'none',
  378. 'apply_button' => 'Show',
  379. 'no_results_text' => 'Click "Show" to see a list of all controlled vocabulary terms matching the entered criteria. If you leave a any of the criteria blank then the controlled vocabulary terms will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all controlled vocabulary terms will be listed.',
  380. ),
  381. ));
  382. $handler->override_option('access', array(
  383. 'type' => 'perm',
  384. 'perm' => 'access chado_cv content',
  385. ));
  386. $handler->override_option('cache', array(
  387. 'type' => 'none',
  388. ));
  389. $handler->override_option('title', 'Controlled Vocabulary Terms');
  390. $handler->override_option('header', 'Click "Show" to see a list of all controlled vocabulary terms matching the entered criteria. If you leave a any of the criteria blank then the controlled vocabulary terms will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all controlled vocabulary terms will be listed.');
  391. $handler->override_option('header_format', '2');
  392. $handler->override_option('header_empty', 0);
  393. $handler->override_option('empty', 'There are no terms associated with the selected controlled vocabulary. Please select a different vocabulary from the list above.');
  394. $handler->override_option('empty_format', '1');
  395. $handler->override_option('items_per_page', 50);
  396. $handler->override_option('use_pager', '1');
  397. $handler->override_option('style_plugin', 'table');
  398. $handler->override_option('style_options', array(
  399. 'grouping' => '',
  400. 'override' => 1,
  401. 'sticky' => 0,
  402. 'order' => 'asc',
  403. 'summary' => '',
  404. 'columns' => array(
  405. 'name_1' => 'name_1',
  406. 'name' => 'name',
  407. 'definition' => 'definition',
  408. 'is_obsolete' => 'is_obsolete',
  409. 'is_relationshiptype' => 'is_relationshiptype',
  410. ),
  411. 'info' => array(
  412. 'name_1' => array(
  413. 'sortable' => 1,
  414. 'separator' => '',
  415. ),
  416. 'name' => array(
  417. 'sortable' => 1,
  418. 'separator' => '',
  419. ),
  420. 'definition' => array(
  421. 'sortable' => 0,
  422. 'separator' => '',
  423. ),
  424. 'is_obsolete' => array(
  425. 'sortable' => 1,
  426. 'separator' => '',
  427. ),
  428. 'is_relationshiptype' => array(
  429. 'sortable' => 1,
  430. 'separator' => '',
  431. ),
  432. ),
  433. 'default' => '-1',
  434. ));
  435. $handler = $view->new_display('page', 'Page', 'page_1');
  436. $handler->override_option('path', 'admin/tripal/tripal_cv/list_cvterms');
  437. $handler->override_option('menu', array(
  438. 'type' => 'normal',
  439. 'title' => 'Term Listing',
  440. 'description' => 'A listing of a controlled vocabulary terms for a given vocabulary',
  441. 'weight' => '10',
  442. 'name' => 'navigation',
  443. ));
  444. $handler->override_option('tab_options', array(
  445. 'type' => 'none',
  446. 'title' => '',
  447. 'description' => '',
  448. 'weight' => 0,
  449. 'name' => 'navigation',
  450. ));
  451. $views[$view->name] = $view;
  452. // Main cv default listing
  453. $view = new view;
  454. $view->name = 'cv_listing';
  455. $view->description = 'A listing of all controlled vocabularies';
  456. $view->tag = 'chado default';
  457. $view->base_table = 'cv';
  458. $view->core = 6;
  459. $view->api_version = '2';
  460. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  461. $handler = $view->new_display('default', 'Defaults', 'default');
  462. $handler->override_option('fields', array(
  463. 'name' => array(
  464. 'label' => 'Name',
  465. 'alter' => array(
  466. 'alter_text' => 0,
  467. 'text' => '',
  468. 'make_link' => 0,
  469. 'path' => '',
  470. 'absolute' => 0,
  471. 'link_class' => '',
  472. 'alt' => '',
  473. 'rel' => '',
  474. 'prefix' => '',
  475. 'suffix' => '',
  476. 'target' => '',
  477. 'help' => '',
  478. 'trim' => 0,
  479. 'max_length' => '',
  480. 'word_boundary' => 1,
  481. 'ellipsis' => 1,
  482. 'html' => 0,
  483. 'strip_tags' => 0,
  484. ),
  485. 'empty' => '',
  486. 'hide_empty' => 0,
  487. 'empty_zero' => 0,
  488. 'hide_alter_empty' => 1,
  489. 'type' => 'separator',
  490. 'separator' => ', ',
  491. 'exclude' => 0,
  492. 'id' => 'name',
  493. 'table' => 'cv',
  494. 'field' => 'name',
  495. 'relationship' => 'none',
  496. ),
  497. 'definition' => array(
  498. 'label' => 'Definition',
  499. 'alter' => array(
  500. 'alter_text' => 0,
  501. 'text' => '',
  502. 'make_link' => 0,
  503. 'path' => '',
  504. 'absolute' => 0,
  505. 'link_class' => '',
  506. 'alt' => '',
  507. 'rel' => '',
  508. 'prefix' => '',
  509. 'suffix' => '',
  510. 'target' => '',
  511. 'help' => '',
  512. 'trim' => 0,
  513. 'max_length' => '',
  514. 'word_boundary' => 1,
  515. 'ellipsis' => 1,
  516. 'html' => 0,
  517. 'strip_tags' => 0,
  518. ),
  519. 'empty' => '',
  520. 'hide_empty' => 0,
  521. 'empty_zero' => 0,
  522. 'hide_alter_empty' => 1,
  523. 'type' => 'separator',
  524. 'separator' => ', ',
  525. 'exclude' => 0,
  526. 'id' => 'definition',
  527. 'table' => 'cv',
  528. 'field' => 'definition',
  529. 'relationship' => 'none',
  530. ),
  531. 'nothing' => array(
  532. 'label' => 'Terms',
  533. 'alter' => array(
  534. 'text' => 'view',
  535. 'make_link' => 1,
  536. 'path' => 'admin/tripal/tripal_cv/list_cvterms?cv%5B%5D=[name]',
  537. 'absolute' => 0,
  538. 'link_class' => '',
  539. 'alt' => '',
  540. 'rel' => '',
  541. 'prefix' => '',
  542. 'suffix' => '',
  543. 'target' => '',
  544. 'help' => '',
  545. 'trim' => 0,
  546. 'max_length' => '',
  547. 'word_boundary' => 1,
  548. 'ellipsis' => 1,
  549. 'html' => 0,
  550. 'strip_tags' => 0,
  551. ),
  552. 'empty' => '',
  553. 'hide_empty' => 0,
  554. 'empty_zero' => 0,
  555. 'hide_alter_empty' => 1,
  556. 'exclude' => 0,
  557. 'id' => 'nothing',
  558. 'table' => 'views',
  559. 'field' => 'nothing',
  560. 'relationship' => 'none',
  561. ),
  562. ));
  563. $handler->override_option('filters', array(
  564. 'name' => array(
  565. 'operator' => 'contains',
  566. 'value' => '',
  567. 'group' => '0',
  568. 'exposed' => TRUE,
  569. 'expose' => array(
  570. 'use_operator' => 0,
  571. 'operator' => 'name_op',
  572. 'identifier' => 'name',
  573. 'label' => 'Name Contains',
  574. 'remember' => 0,
  575. ),
  576. 'case' => 0,
  577. 'id' => 'name',
  578. 'table' => 'cv',
  579. 'field' => 'name',
  580. 'relationship' => 'none',
  581. 'values_form_type' => 'textfield',
  582. 'multiple' => 0,
  583. 'optional' => 0,
  584. 'agg' => array(
  585. 'records_with' => 1,
  586. 'aggregates_with' => 0,
  587. ),
  588. ),
  589. 'definition' => array(
  590. 'operator' => 'contains',
  591. 'value' => '',
  592. 'group' => '0',
  593. 'exposed' => TRUE,
  594. 'expose' => array(
  595. 'use_operator' => 0,
  596. 'operator' => 'definition_op',
  597. 'identifier' => 'definition',
  598. 'label' => 'Definition Contains',
  599. 'remember' => 0,
  600. ),
  601. 'case' => 0,
  602. 'id' => 'definition',
  603. 'table' => 'cv',
  604. 'field' => 'definition',
  605. 'relationship' => 'none',
  606. 'agg' => array(
  607. 'records_with' => 1,
  608. 'aggregates_with' => 0,
  609. ),
  610. ),
  611. 'search_results' => array(
  612. 'operator' => '=',
  613. 'value' => '',
  614. 'group' => '0',
  615. 'exposed' => FALSE,
  616. 'expose' => array(
  617. 'operator' => FALSE,
  618. 'label' => '',
  619. ),
  620. 'id' => 'search_results',
  621. 'table' => 'views',
  622. 'field' => 'search_results',
  623. 'relationship' => 'none',
  624. 'apply_button' => 'Show',
  625. 'no_results_text' => 'Click "Show" to see a list of all controlled vocabularies matching the entered criteria. If you leave a any of the criteria blank then the controlled vocabularies will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all controlled vocabularies will be listed.',
  626. ),
  627. ));
  628. $handler->override_option('access', array(
  629. 'type' => 'perm',
  630. 'perm' => 'access chado_cv content',
  631. ));
  632. $handler->override_option('cache', array(
  633. 'type' => 'none',
  634. ));
  635. $handler->override_option('title', 'Controlled Vocabularies');
  636. $handler->override_option('header', 'Click "Show" to see a list of all controlled vocabularies matching the entered criteria. If you leave a any of the criteria blank then the controlled vocabularies will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all controlled vocabularies will be listed.');
  637. $handler->override_option('header_format', '2');
  638. $handler->override_option('header_empty', 0);
  639. $handler->override_option('empty', 'No controlled vocabularies match the supplied criteria.');
  640. $handler->override_option('empty_format', '2');
  641. $handler->override_option('items_per_page', 50);
  642. $handler->override_option('style_plugin', 'table');
  643. $handler->override_option('style_options', array(
  644. 'grouping' => '',
  645. 'override' => 1,
  646. 'sticky' => 0,
  647. 'order' => 'asc',
  648. 'summary' => '',
  649. 'columns' => array(
  650. 'name' => 'name',
  651. 'definition' => 'definition',
  652. 'nothing' => 'nothing',
  653. ),
  654. 'info' => array(
  655. 'name' => array(
  656. 'sortable' => 1,
  657. 'separator' => '',
  658. ),
  659. 'definition' => array(
  660. 'sortable' => 0,
  661. 'separator' => '',
  662. ),
  663. 'nothing' => array(
  664. 'separator' => '',
  665. ),
  666. ),
  667. 'default' => 'name',
  668. ));
  669. $handler = $view->new_display('page', 'Page', 'page_1');
  670. $handler->override_option('path', 'admin/tripal/tripal_cv/list_cvs');
  671. $handler->override_option('menu', array(
  672. 'type' => 'normal',
  673. 'title' => 'CV Listing',
  674. 'description' => 'A listing of all controlled vocabularies',
  675. 'weight' => '10',
  676. 'name' => 'navigation',
  677. ));
  678. $handler->override_option('tab_options', array(
  679. 'type' => 'none',
  680. 'title' => '',
  681. 'description' => '',
  682. 'weight' => 0,
  683. 'name' => 'navigation',
  684. ));
  685. $views[$view->name] = $view;
  686. return $views;
  687. }