123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- require_once "includes/tripal_ds.inc";
- require_once "includes/tripal_ds.ds.inc";
- require_once "includes/tripal_ds.field_group.inc";
- function tripal_ds_init() {
- drupal_add_css(drupal_get_path('module', 'tripal_ds') . '/theme/css/tripaldsfeature.css');
- drupal_add_css(drupal_get_path('module', 'tripal_ds') . '/theme/css/bootstrap.css');
- }
- /**
- * Implements hook_ds_layout_info() to define layouts from code in a module for
- * display suite
- */
- function tripal_ds_ds_layout_info() {
- $path = drupal_get_path('module', 'tripal_ds');
- $layouts = array(
- 'tripal_ds_feature' => array(
- 'label' => t('Tripal Feature Layout'),
- 'path' => $path . '/theme/templates',
- 'regions' => array(
- 'top' => t('Top'),
- 'left' => t('Left'),
- 'right' => t('Right'),
- 'bottom' => t('Bottom'),
- ),
- 'css' => TRUE,
- ),
- );
- return $layouts;
- }
- /*
- * General preprocess function to determine the HOOK for the subsequent preprocess functions
- * to target fields
- function tripal_ds_preprocess(&$vars, $hook) {
- if (isset($vars['elements']['#entity_type'])) {
- $function = __FUNCTION__ . '_' . $vars['elements']['#entity_type'];
- if (function_exists($function)) {
- $function($vars, $hook);
- }
- }
- }
- */
- /**
- * Implements hook_bundle_postcreate().
- *
- * This is a Triapl defined hook and is called in the TripalBundle::create()
- * function to allow modules to perform tasks when a bundle is created.
- */
- function tripal_ds_bundle_postcreate($bundle) {
- $bundle_name = $bundle->name;
- $instances = field_info_instances('TripalEntity', $bundle_name);
- _ds_layout_settings_info($bundle_name, $instances);
- }
|