123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- <?php
- require('api/tripal_example.api.inc');
- require('theme/tripal_example.theme.inc');
- require('includes/tripal_example.chado_node.inc');
- function tripal_example_permission() {
-
-
-
-
-
-
-
- return array(
- 'access chado_example content' => array(
- 'title' => t('View Examples'),
- 'description' => t('Allow users to view example pages.'),
- ),
- 'create chado_example content' => array(
- 'title' => t('Create Examples'),
- 'description' => t('Allow users to create new example pages.'),
- ),
- 'delete chado_example content' => array(
- 'title' => t('Delete Examples'),
- 'description' => t('Allow users to delete example pages.'),
- ),
- 'edit chado_example content' => array(
- 'title' => t('Edit Examples'),
- 'description' => t('Allow users to edit example pages.'),
- ),
- 'administer tripal example' => array(
- 'title' => t('Administer Examples'),
- 'description' => t('Allow users to administer all examples.'),
- ),
- );
- }
- function tripal_example_menu() {
- $items = array();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $items['admin/tripal/extension/tripal_example'] = array(
- 'title' => 'Examples',
- 'description' => 'Example module for help with development of new extension modules.',
- 'page callback' => 'tripal_example_admin_examples_listing',
- 'access arguments' => array('administer tripal example'),
- 'type' => MENU_NORMAL_ITEM,
-
-
-
-
- 'file' => '/includes/tripal_example.admin.inc',
- );
-
-
-
-
-
-
-
-
- $items['admin/tripal/extension/tripal_example/help'] = array(
- 'title' => 'Help',
- 'description' => 'Basic Description of Tripal Library Module Functionality',
- 'page callback' => 'theme',
- 'page arguments' => array('tripal_example_help'),
- 'access arguments' => array('administer tripal example'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 10,
- );
-
-
-
-
-
-
-
-
-
- $items['admin/tripal/extension/tripal_example/configuration'] = array(
- 'title' => 'Settings',
- 'description' => 'Configure the Tripal Library module',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_example_admin'),
- 'access arguments' => array('administer tripal example'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 5,
- );
-
-
-
-
-
- $items['admin/tripal/extension/tripal_example/sync'] = array(
- 'title' => ' Sync',
- 'description' => 'Create pages on this site for examples stored in Chado',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('chado_node_sync_form', 'tripal_example', 'chado_example'),
- 'access arguments' => array('administer tripal example'),
- 'type' => MENU_LOCAL_TASK,
- 'weight' => 2,
- );
-
-
-
-
-
-
-
-
-
-
-
-
- $items['admin/tripal/legacy/tripal_example/chado_example_toc'] = array(
- 'title' => ' TOC',
- 'description' => 'Manage the table of contents for example nodes.',
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('tripal_core_content_type_toc_form', 'chado_example'),
- 'access arguments' => array('administer tripal example'),
- 'type' => MENU_LOCAL_TASK,
- 'file' => 'includes/tripal_core.toc.inc',
- 'file path' => drupal_get_path('module', 'tripal_core'),
- 'weight' => 3
- );
- return $items;
- }
- function tripal_example_views_api() {
- return array(
- 'api' => 3.0,
- );
- }
- function tripal_example_theme($existing, $type, $theme, $path) {
- $core_path = drupal_get_path('module', 'tripal_core');
-
-
-
-
-
-
- $items = array(
-
-
-
-
-
-
-
-
-
-
- 'node__chado_example' => array(
- 'template' => 'node--chado-generic',
- 'render element' => 'node',
- 'base hook' => 'node',
- 'path' => "$core_path/theme/templates",
- ),
-
-
-
-
-
-
-
-
-
-
-
- 'tripal_example_base' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_example_base',
- 'path' => "$path/theme/templates",
- ),
-
- 'tripal_example_help' => array(
- 'template' => 'tripal_example_help',
- 'variables' => array(NULL),
- 'path' => "$path/theme/templates",
- ),
-
- 'tripal_example_teaser' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_example_teaser',
- 'path' => "$path/theme/templates",
- ),
-
-
-
-
-
- 'tripal_example_properties' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_example_properties',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_example_references' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_example_references',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_example_relationships' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_example_relationships',
- 'path' => "$path/theme/templates",
- ),
-
-
-
-
-
-
-
-
- 'tripal_organism_examples' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_organism_examples',
- 'path' => "$path/theme/templates",
- ),
- );
- return $items;
- }
- function tripal_example_help ($path, $arg) {
-
-
-
-
-
-
-
- if ($path == 'admin/help#tripal_example') {
- return theme('tripal_example_help', array());
- }
- }
- function tripal_example_cron() {
-
-
- }
- function tripal_example_form_alter(&$form, &$form_state, $form_id) {
- if ($form_id == "chado_example_node_form") {
-
-
-
-
-
-
-
-
-
-
- $form['actions']['preview']['#access'] = FALSE;
-
-
- unset($form['body']);
- }
- }
|