tripal_cv.views.inc 19 KB

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