Browse Source

Added property to TripalField, and updated docuemntation

Stephen Ficklin 8 years ago
parent
commit
149c775388

+ 0 - 3
tripal/api/tripal.entities.api.inc

@@ -561,12 +561,9 @@ function tripal_refresh_bundle_fields($bundle_name) {
   }
   // Allow modules to add fields to the new bundle.
   $modules = module_implements('bundle_fields_info');
-  dpm($modules);
   foreach ($modules as $module) {
     $function = $module . '_bundle_fields_info';
     $info = $function('TripalEntity', $bundle);
-    dpm($module);
-    dpm($info);
     foreach ($info as $field_name => $details) {
       $field_type = $details['type'];
 

+ 6 - 0
tripal/includes/TripalFields/TripalField.inc

@@ -74,6 +74,12 @@ class TripalField {
   // and field_create_instance().
   public static $no_ui = TRUE;
 
+  // A boolean specifying that the field will not contain any data. This
+  // should exclude the field from web serivces or downloads.  An example
+  // could be a quick search field that appears on the page that redirects
+  // the user but otherwise provides no data.
+  public static $no_data = FALSE;
+
 
   // --------------------------------------------------------------------------
   //              PROTECTED CLASS MEMBERS -- DO NOT OVERRIDE

+ 11 - 5
tripal/includes/TripalFields/TripalFieldFormatter.inc

@@ -66,11 +66,17 @@ class TripalFieldFormatter {
    * This form will not be displayed if the formatter_settings_summary()
    * function does not return anything.
    *
-   * @param $field
-   * @param $instance
-   * @param $view_mode
-   * @param $form
-   * @param $form_state
+   * param $field
+   *   The field structure being configured.
+   * param $instance
+   *   The instance structure being configured.
+   * param $view_mode
+   *   The view mode being configured.
+   * param $form
+   *   The (entire) configuration form array, which will usually have no use
+   *   here.  Typically for reference only.
+   * param $form_state
+   *   The form state of the (entire) configuration form.
    *
    * @return
    *   A Drupal Form array containing the settings form for this field.