tripal_cv.views.inc 19 KB

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