Browse Source

Resolve typos in comments of API documentation

Michael Zhou 4 years ago
parent
commit
e22dc9b6fe

+ 2 - 2
tripal/api/tripal.collections.api.inc

@@ -4,7 +4,7 @@
  * @file
  *
  * Provides the API for working with Data collections. This includes creation,
- * experiation, and retreival.
+ * expiration, and retrieval.
  */
 
 /**
@@ -26,7 +26,7 @@
  * Creates a collection of entities for a given user.
  *
  * Use this function if you want to create a new collection with an bundle.
- * Otherwise, a new colleciton can also be created by creating an new instance
+ * Otherwise, a new collection can also be created by creating an new instance
  * of a TripalEntityCollection object.
  *
  * @param  $details

+ 1 - 1
tripal/api/tripal.d3js.api.inc

@@ -24,7 +24,7 @@
 
 
 /**
- * Load D3.js releated javascripts for the current page.
+ * Load D3.js related javascripts for the current page.
  *
  * @ingroup tripal_d3js_api
  */

+ 17 - 17
tripal/api/tripal.entities.api.inc

@@ -215,7 +215,7 @@ function hook_tripal_default_title_format($bundle, $available_tokens) {
 function tripal_load_entity($entity_type, $ids = FALSE, $reset = FALSE,
                             $field_ids = [], $cache = TRUE) {
 
-  // The $conditions is deprecated in the funtion arguments of entity_load
+  // The $conditions is deprecated in the function arguments of entity_load
   // so it was removed from the parameters of this function as well. But
   // the load() function of the entity controller still expects it so set it
   // to an empty array.
@@ -286,7 +286,7 @@ function tripal_load_term_entity($values) {
 }
 
 /**
- * Retrieves a TripalVocab entity that maches the given arguments.
+ * Retrieves a TripalVocab entity that matches the given arguments.
  *
  * @param $values
  *   An associative array used to match a vocabulary.
@@ -331,7 +331,7 @@ function tripal_load_vocab_entity($values) {
  *     - name:  the bundle name (e.g. 'bio_data_234')
  *     - label: the bundle label (e.g. 'Organism')
  *     - term_id: the term ID to which the bundle belongs
- *     - accession: the full acccession for the bundle (e.g. OBI:0100026)
+ *     - accession: the full accession for the bundle (e.g. OBI:0100026)
  *
  * @return
  *   A TripalBundle entity object or NULL if not found.
@@ -565,7 +565,7 @@ function tripal_create_bundle($args, $job = NULL) {
     // Attache the bundle fields.
     tripal_create_bundle_fields($bundle, $term);
 
-    // Specifically commiting here since we have a fully featured bundle.
+    // Specifically committing here since we have a fully featured bundle.
     // Post-create hook implementations assume we have a
     // created bundle so we don't want to rollback if a
     // custom implementation causes an exception.
@@ -828,7 +828,7 @@ function tripal_create_bundle_fields($bundle, $term) {
     // Make sure the term is not used for any other existing field instance.
     $skip = FALSE;
     foreach ($existing_instances as $existing_name => $existing_instance) {
-      // If this instance term is the same as this exsiting term and the
+      // If this instance term is the same as this existing term and the
       // instance name is not the same then we have a problem.
       $existing_term_id = $existing_instance['settings']['term_vocabulary'] . ':' . $existing_instance['settings']['term_accession'];
       $existing_field = field_info_field($existing_name);
@@ -844,7 +844,7 @@ function tripal_create_bundle_fields($bundle, $term) {
         $skip = TRUE;
       }
 
-      // If the instance term is the same as this exsting term but the storage
+      // If the instance term is the same as this existing term but the storage
       // types are different then we have a problem.
       $existing_storage = $existing_field['storage']['type'];
       $this_field_storage = $field_info[$details['field_name']]['storage']['type'];
@@ -991,7 +991,7 @@ function tripal_update_bundle_field($field_name, $field_info, $entity_type_name,
  * @param string $variable_name
  *   The name of the variable as in tripal_variables.name.
  * @param int $bundle_id
- *   The unique identfier for the bundle you want the value for.
+ *   The unique identifier for the bundle you want the value for.
  *
  * @return text
  *   The value of the specified variable for the specified bundle.
@@ -1029,7 +1029,7 @@ function tripal_get_bundle_variable($variable_name, $bundle_id, $default = FALSE
  * @param string $variable_name
  *   The name of the variable as in tripal_variables.name.
  * @param int $bundle_id
- *   The unique identfier for the bundle you want the value for.
+ *   The unique identifier for the bundle you want the value for.
  * @param $text $value
  *   The value of the variable for the given bundle.
  *
@@ -1320,7 +1320,7 @@ function _tripal_get_entity_tokens_for_elements($instance, $parent, $elements, &
  * @param TripalEntity $entity
  *   The entity with field values used to find values of tokens.
  * @param TripalBundle $bundle_entity
- *   The bundle enitity containing special values sometimes needed for token
+ *   The bundle entity containing special values sometimes needed for token
  *   replacement.
  *
  * @return
@@ -1408,7 +1408,7 @@ function tripal_replace_entity_tokens($string, &$entity, $bundle_entity = NULL)
       $value = $bundle_entity->id;
     }
     // The TripalBundle__bundle_id is a special token for substituting the
-    // entty id.
+    // entity id.
     elseif ($field_name === 'TripalEntity__entity_id') {
       // This token should be the id of the TripalEntity.
       $value = $entity->id;
@@ -1522,7 +1522,7 @@ function tripal_get_bundle_details($bundle_name) {
     'fields' => [],
   ];
 
-  // Iterate through each feild and provide a discription of it and
+  // Iterate through each field and provide a description of it and
   // it's sub elements.
   foreach ($instances as $instance) {
     // Skip deleted fields.
@@ -1551,7 +1551,7 @@ function tripal_get_bundle_details($bundle_name) {
       'required' => $instance['required'] ? TRUE : FALSE,
       'type' => 'xs:string',
       'readonly' => TRUE,
-      // The cardinatlity value always comes from the field.
+      // The cardinality value always comes from the field.
       'cardinality' => $field['cardinality'],
     ];
 
@@ -1590,7 +1590,7 @@ function tripal_get_bundle_details($bundle_name) {
 function _tripal_get_bundle_field_element_details($elements, &$field_details) {
   $field_details['elements'] = [];
   foreach ($elements as $element_key => $element_info) {
-    // Handle the entity element differnetly.
+    // Handle the entity element differently.
     if ($element_key == 'entity') {
       continue;
     }
@@ -1743,7 +1743,7 @@ function tripal_unpublish_orphans(int $bundle_id, TripalJob $job = NULL) {
  *   cleaned up.
  *
  * @return integer
- *   The number of entitites that were cleaned up.
+ *   The number of entities that were cleaned up.
  */
 function hook_bundle_delete_orphans(TripalBundle $bundle, array $ids, TripalJob $job = NULL) {
 
@@ -1752,7 +1752,7 @@ function hook_bundle_delete_orphans(TripalBundle $bundle, array $ids, TripalJob
 }
 
 /**
- * A hook for modules to report on oprhaned entities.
+ * A hook for modules to report on orphaned entities.
  *
  * An orphaned entity can occur if the module that created the entity
  * unknowingly lost its underlying record in its data store.  Such a case
@@ -1760,12 +1760,12 @@ function hook_bundle_delete_orphans(TripalBundle $bundle, array $ids, TripalJob
  * outside of the module's control. This function allows each module
  * to report if any orphans are missing for a given bundle type.
  *
- * @param TripalBunldle $bundle
+ * @param TripalBundle $bundle
  *   A TripalBundle object for the bundle that should be checked for
  *   orphaned entities.
  * @param bool $count
  *   TRUE if the function should return only the number of orphaned entities.
- *   FALSE if the function should return the list of orphned entities.
+ *   FALSE if the function should return the list of orphaned entities.
  * @param integer $offset
  *   For paging of entities set this to the offset within the total count.
  * @param integer $limit

+ 3 - 3
tripal/api/tripal.fields.api.inc

@@ -476,15 +476,15 @@ function tripal_load_include_downloader_class($class) {
  * A Drupal field attached to an entity may have multiple items (i.e. it has
  * a cardinality > 1).  Each of these items will always have a 'value' key that
  * contains the data for that field. However, fields can also have other keys
- * with their own values.  You can easily retreive the value of these keys
+ * with their own values.  You can easily retrieve the value of these keys
  * using this function.  What makes this function useful is that you can
  * provide a default value to use if the key has no value.  This is useful
  * when developing a TripalField::widgetForm function and you need to
- * retreive default values and you don't want to have to always check if the
+ * retrieve default values and you don't want to have to always check if the
  * value is set.
  *
  * @param $items
- *   The fields $items array. Compatbile with that returned by field_get_items.
+ *   The fields $items array. Compatible with that returned by field_get_items.
  * @param $delta
  *   The index of the item.
  * @parm $key

+ 1 - 1
tripal/api/tripal.files.api.inc

@@ -22,7 +22,7 @@
  * installation of the module in the .install file.  However this causes
  * permission problems if the module is installed via drush with a
  * user account that is not the same as the web user.  Therefore, this
- * function should not be called in a location accessiblve via a drush
+ * function should not be called in a location accessible via a drush
  * command.  The tripal_get_files_dir() and tripal_get_files_stream()
  * will automatically create the directory if it doesn't exist so there is
  * little need to call this function directly.

+ 1 - 1
tripal/api/tripal.importer.api.inc

@@ -134,7 +134,7 @@ function tripal_load_include_importer_class($class) {
  * Tripal provides the TripalImporter class to allow site developers to
  * create their own data loaders.  Site users can then use any data loader
  * implemented for the site by submitting the form that comes with the
- * TripalImporter impelmentation.  This function runs the importer using the
+ * TripalImporter implementation.  This function runs the importer using the
  * arguments provided by the user.
  *
  * @param $import_id

+ 8 - 8
tripal/api/tripal.jobs.api.inc

@@ -294,7 +294,7 @@ function tripal_rerun_job($job_id, $goto_jobs_page = TRUE) {
  *   The job_id of the job to be cancelled
  *
  * @return
- *   FALSE if the an error occured or the job could not be canceled, TRUE
+ *   FALSE if the an error occurred or the job could not be canceled, TRUE
  *   otherwise.
  *
  * @ingroup tripal_jobs_api
@@ -330,7 +330,7 @@ function tripal_cancel_job($job_id, $redirect = TRUE) {
  *
  * @param $job_id
  *   To launch a specific job provide the job id.  This option should be
- *   used sparingly as the jobs queue managment system should launch jobs
+ *   used sparingly as the jobs queue management system should launch jobs
  *   based on order and priority.  However there are times when a specific
  *   job needs to be launched and this argument will allow it.  Only jobs
  *   which have not been run previously will run.
@@ -390,7 +390,7 @@ function tripal_launch_job($do_parallel = 0, $job_id = NULL, $max_jobs = -1, $si
 
     $job_id = $jid->job_id;
 
-    // Create the Tripoaljob object.
+    // Create the Tripaljob object.
     $job = new TripalJob();
     $job->load($job_id);
 
@@ -462,7 +462,7 @@ function tripal_set_job_progress($job_id, $percentage) {
 }
 
 /**
- * Retrieves the current proress of a job.
+ * Retrieves the current progress of a job.
  *
  * @param $job_id
  *   The job_id to get the progress for
@@ -508,9 +508,9 @@ function tripal_get_job_progress($job_id) {
  *    - status: The status of the job: Waiting, Completed, Running or Cancelled.
  *    - submit_date:  The UNIX timestamp when the job was submitted.
  *    - start_time: The UNIX timestamp for when the job started running.
- *    - end_time: The UNIX timestampe when the job completed running.
- *    - error_msg: Any error message that occured during execution of the job.
- *    - prirotiy: The execution priority of the job (value between 1 and 10)
+ *    - end_time: The UNIX timestamp when the job completed running.
+ *    - error_msg: Any error message that occurred during execution of the job.
+ *    - priority: The execution priority of the job (value between 1 and 10)
  *
  * @ingroup tripal_jobs_api
  */
@@ -552,7 +552,7 @@ function tripal_get_active_jobs($modulename = NULL) {
  * Execute a specific Tripal Job.
  *
  * @param $job_id
- *   The job id to be exeuted.
+ *   The job id to be executed.
  * @param bool $redirect [optional]
  *   Whether to redirect to the job page or not.
  *

+ 2 - 2
tripal/api/tripal.notice.api.inc

@@ -17,7 +17,7 @@
  * @}
  */
 
-// Globals used by Tripals Error catching functions
+// Globals used by Tripal's Error catching functions
 // Should match those defined by watchdog
 define('TRIPAL_CRITICAL', 2);
 define('TRIPAL_ERROR', 3);
@@ -39,7 +39,7 @@ define('TRIPAL_DEBUG', 7);
  * will add backtrace information to the message.
  *
  * @param $type
- *   The catagory to which this message belongs. Can be any string, but the
+ *   The category to which this message belongs. Can be any string, but the
  *   general practice is to use the name of the module.
  * @param $severity
  *   The severity of the message; one of the following values:

+ 3 - 3
tripal/api/tripal.terms.api.inc

@@ -2,7 +2,7 @@
 /**
  * @file
  * Provides an application programming interface (API) for working with
- * controlled vocaublary terms.
+ * controlled vocabulary terms.
  */
 
 /**
@@ -10,7 +10,7 @@
  * @ingroup tripal_api
  * @{
  * Tripal provides an application programming interface (API) for working with
- * controlled vocaublary terms.  Tripal v3 is highly dependent on controlled
+ * controlled vocabulary terms.  Tripal v3 is highly dependent on controlled
  * vocabularies for identifying all content types and fields attached to those
  * content types.  However, Tripal v3 is also database agnostic. Therefore,
  * controlled vocabularies can be stored in any database back-end.  By default
@@ -66,7 +66,7 @@ function hook_vocab_storage_info() {
  *
  * Tripal allows for vocabularies to be stored separately from the biological
  * data. This hook allows the default term storage backend to provide an
- * approprite form for importing ontologies (either in OBO or OWL format).
+ * appropriate form for importing ontologies (either in OBO or OWL format).
  *
  * @param $form
  * @param $form_state

+ 4 - 4
tripal/api/tripal.upload.api.inc

@@ -86,7 +86,7 @@
  *
  *
  * 3) Files are uploaded automatically to Tripal.  Files are saved in the
- * Tripal user's directory.  You can retreive information about the
+ * Tripal user's directory.  You can retrieve information about the
  * file by querying for the file category for the current project.
  *
  * @code
@@ -104,12 +104,12 @@
 /**
  * Allows a module to interact with the Tripal file uploader during upload.
  *
- * This function is called prior to an 'action' aoccuring and allows the
+ * This function is called prior to an 'action' occurring and allows the
  * module that is responsible for the file upload to halt an upload if
  * needed.
  *
  * @param $action
- *   The current action that is being peformed during the upload process. The
+ *   The current action that is being performed during the upload process. The
  *   actions are:  'save', 'check' and 'merge'.
  * @param $details
  *   An associative array containing details about the upload process. Valid
@@ -133,7 +133,7 @@ function hook_file_upload_check($action, $details, &$message) {
       // Place code here when chunks are being saved.
       break;
     case 'check':
-      // Place code here when a chunck is being checked if the upload
+      // Place code here when a chunk is being checked if the upload
       // completed successfully.
       break;
     case 'merge':

+ 2 - 2
tripal/api/tripal.variables.api.inc

@@ -30,7 +30,7 @@
  *   The description for the variable
  *
  * @return
- *   A record object containg the variable that was added if successful.
+ *   A record object containing the variable that was added if successful.
  *
  * @ingroup tripal_variables_api
  */
@@ -71,7 +71,7 @@ function tripal_insert_variable($name, $description) {
  *   The name of the variable to retrieve
  *
  * @return
- *   A record object containg the variable.
+ *   A record object containing the variable.
  *
  * @ingroup tripal_variables_api
  */