Skip to content

Commit

Permalink
Merge pull request #1390 from tripal/tv4g0-issue1389-typos
Browse files Browse the repository at this point in the history
Tv4g0 issue1389 typos
  • Loading branch information
laceysanderson committed Jan 17, 2023
2 parents cd722bf + e042ced commit 4055582
Show file tree
Hide file tree
Showing 53 changed files with 242 additions and 242 deletions.
6 changes: 3 additions & 3 deletions tripal/config/schema/tripal.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ tripal.tripal_content_terms.*:
mapping:
name:
type: string
label: 'Vocbulary Name'
label: 'Vocabulary Name'
nullable: false
label:
type: string
label: 'Vocbulary Label'
label: 'Vocabulary Label'
nullable: false
url:
type: string
label: 'Vocbulary URL'
label: 'Vocabulary URL'
nullable: false
idSpaces:
type: sequence
Expand Down
2 changes: 1 addition & 1 deletion tripal/js/tripal.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
this.id = id;
this.hide_empty_field = hide_empty_field;

// Get the pane that this field beongs to (if one exists).
// Get the pane that this field belongs to (if one exists).
this.pane = this.getPane();
}

Expand Down
2 changes: 1 addition & 1 deletion tripal/js/tripal.user_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}

/**
* Expands a node in the CV tree browser and loads it's children via AJAX.
* Expands a node in the CV tree browser and loads its children via AJAX.
*/
function expandNode(item){
item.removeClass('tree-node-closed');
Expand Down
8 changes: 4 additions & 4 deletions tripal/src/Entity/TripalEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
}

/**
* Retruns an associative array of property type value for the enitty.
* Returns an associative array of property type value for the entity.
*
* The array is keyed in the following leveles:
* The array is keyed in the following levels:
* - 1st: Tripal Stroage Plugin ID
* - 2nd: Field name
* - 3rd: Delta value of the field item.
Expand Down Expand Up @@ -685,7 +685,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie
$delta = $item->getName();
$tsid = $item->tripalStorageId();

// reate a new properties array for this field item.
// Create a new properties array for this field item.
$prop_values = [];
$prop_types = [];
foreach ($values[$tsid][$field_name][$delta] as $key => $info) {
Expand All @@ -704,7 +704,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie
* {@inheritdoc}
*/
public function validate() {
// Let the parent class do it's validations and return the violoations list.
// Let the parent class do its validations and return the violations list.
$violations = parent::validate();

// Create a values array appropriate for `loadValues()`
Expand Down
6 changes: 3 additions & 3 deletions tripal/src/Entity/TripalEntityStorageSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function onFieldableEntityTypeCreate(EntityTypeInterface $entity_type, ar
foreach ($field_storage_definitions as $storageDefinition) {
$field = \Drupal::service("plugin.manager.field.field_type").getInstance($storageDefinition->getType());
if ($field instanceof TripalFieldItemInterface) {
// Each field can define it's value as a single-depth array of
// Each field can define its value as a single-depth array of
// key => value pairs where the key is a name for that data (e.g. accession )
// and the value is an implementation of StoragePropertyTypeBase setting the
// type of the value (e.g. string).
Expand All @@ -31,7 +31,7 @@ public function onFieldableEntityTypeCreate(EntityTypeInterface $entity_type, ar
// Note: this can be changed in the admin UI since all TripalStorage
// types are expected to be able to read this key-value structure.
$tsid = $field->tripalStorageId();
// Since each StoragePropertyTypeBase implementation knows it's
// Since each StoragePropertyTypeBase implementation knows its
// key (saved as id) and associated field, we can merge them all here
// without saving the key mapping.
// We're basically just compiling all field property types with the
Expand Down Expand Up @@ -132,7 +132,7 @@ public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, En
}
}
// Case 2: the new field did not exist before.
// - we will need to add the new field to it's new storage.
// - we will need to add the new field to its new storage.
else {
if (array_key_exists($tsid, $storageAdd)) {
$storageAdd[$tsid] = array_merge($storageAdd[$tsid], $types);
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Entity/TripalEntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static function create(array $values = []) {

// Let the parent implementation finish creating the object.
// NOTE: We do things in this order because a configuration entity cannot
// save an object to it's storage. Thus we need to extract the term strings
// save an object to its storage. Thus we need to extract the term strings
// for storage and retrieve the Term object later if requested via getTerm().
return parent::create($values);
}
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::state()->set('tripal_site_registration', $form_state);

// Now send the updated info to the Tripal Site.
// Only register with tripal.info if the user has not opt'd out.
// Only register with tripal.info if the user has not opted out.
$messenger = \Drupal::messenger();
if ($form_state->getValue('disable_tripal_reporting') == FALSE) {
$this->tripal_registration_remote_submit($form_state);
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalAdminAddCustomForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$quota = $form_state->getValue('quota');
$expiration = $form_state->getValue('expiration');

// if the 2nd element of the qutoa string occupied by a valid suffix we need to check to see
// if the 2nd element of the quota string occupied by a valid suffix we need to check to see
// what we have to multiply the value by (1024 for GB 1024^2 for TB because
// we assume that the initial number is already in MB)
$matches = [];
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalAdminManageFilesForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
public function submitForm(array &$form, FormStateInterface $form_state) {
$upload_max = $form_state->getValue('upload_max');

// if the 2nd element of the qutoa string occupied by a valid suffix we need to check to see
// if the 2nd element of the quota string occupied by a valid suffix we need to check to see
// what we have to multiply the value by (1024 for GB 1024^2 for TB because
// we assume that the initial number is already in MB)
$matches = [];
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalAdminManageQuotaForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$quota = $form_state->getValue('quota');
$expiration = $form_state->getValue('expiration');

// if the 2nd element of the qutoa string occupied by a valid suffix we need to check to see
// if the 2nd element of the quota string occupied by a valid suffix we need to check to see
// what we have to multiply the value by (1024 for GB 1024^2 for TB because
// we assume that the initial number is already in MB)
$matches = [];
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalEntityTypeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function form(array $form, FormStateInterface $form_state) {
// As mentioned above, the term cannot be changed later!
// As such, if this is not a new content type then we will only take into
// account the set term (not the form state) and disable the field.
// NOTE: we go this route because only showin the field on the add page
// NOTE: we go this route because only showing the field on the add page
// causes a validation error.
else {
$vocab_label = $term_name = $term_accession = '';
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalFileQuota.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$quota = $form_state->getValue('default_quota');
$expiration = $form_state->getValue('default_expiration_date');

// if the 2nd element of the qutoa string occupied by a valid suffix we need to check to see
// if the 2nd element of the quota string occupied by a valid suffix we need to check to see
// what we have to multiply the value by (1024 for GB 1024^2 for TB because
// we assume that the initial number is already in MB)
$matches = [];
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalFileQuotaCustomEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$quota = $form_state->getValue('quota');
$expiration = $form_state->getValue('expiration');

// if the 2nd element of the qutoa string occupied by a valid suffix we need to check to see
// if the 2nd element of the quota string occupied by a valid suffix we need to check to see
// what we have to multiply the value by (1024 for GB 1024^2 for TB because
// we assume that the initial number is already in MB)
$matches = [];
Expand Down
2 changes: 1 addition & 1 deletion tripal/src/Form/TripalImporterForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
$form_state->setErrorByName('file_local', t("You must provide a file."));
}

// Now allow the loader to do validation of it's form additions.
// Now allow the loader to do validation of its form additions.
$importer->formValidate($form, $form_state);
}
}
2 changes: 1 addition & 1 deletion tripal/src/Services/TripalFieldsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function setFieldDefDefaults(array $field_def = []) : array {
foreach ($field_def['display'] as $display_type => $view_modes) {
foreach ($view_modes as $view_mode => $mode_config) {
foreach ($mode_config as $setting_name => $value) {
// Maake sure the label is an allowed value.
// Make sure the label is an allowed value.
if ($setting_name == 'label') {
if (in_array($value, ['above', 'inline', 'hidden', 'visually_hidden'])) {
$new_defs['display'][$display_type][$view_mode][$setting_name] = $value;
Expand Down
4 changes: 2 additions & 2 deletions tripal/src/TripalDBX/TripalDbxConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function __construct(
// Check if a Tripal DBX managed schema name has been specified.
if (!empty($schema_name)) {
// We must use this PostgreSQL schema instead of the Drupal one as default
// for this dtaabase connection. To do so, we use the schema name as a
// for this database connection. To do so, we use the schema name as a
// prefix (which is supported by Drupal PostgreSQL implementation).
// If there are table-specific prefixes set, we assume the user knows what
// he/she wants to do and we won't change those.
Expand Down Expand Up @@ -1253,7 +1253,7 @@ public function executeSqlQueries(
foreach ($search_path_mode as $old_name => $replacement) {

// Ensure the replacement pattern is sanitized.
// Secure replacement (we allow comas and spaces).
// Secure replacement (we allow commas and spaces).
$replacement = preg_replace(
'/[^a-z_\\xA0-\\xFF0-9\s,]+/',
'',
Expand Down
10 changes: 5 additions & 5 deletions tripal/src/TripalDBX/TripalDbxSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Tripal DBX API Schema class.
*
* NOTE: This class should not be instanciated directly but rather it should
* NOTE: This class should not be instantiated directly but rather it should
* be accessed through a TripalDbxConnection object using the schema() method.
*
* This class provides a Tripal-specific implementation of the Drupal Schema
Expand Down Expand Up @@ -106,14 +106,14 @@ abstract public function getSchemaDef(array $parameters) :array;
*
* Overrides default constructor to manage the Tripal DBX managed schema name.
*
* The TripalDbxSchema object should be instanciated by the
* The TripalDbxSchema object should be instantiated by the
* TripalDbxConnection::schema() method in order to avoid issues when the
* default Tripal DBX managed schema name is changed in the TripalDbxConnection
* object which could lead to issues.
*
* If you choose to instanciate a TripalDbxSchema object yourself, you are
* If you choose to instantiate a TripalDbxSchema object yourself, you are
* responsible to not change the Tripal DBX managed schema name of the connection
* object used to instanciate this TripalDbxSchema.
* object used to instantiate this TripalDbxSchema.
*
* @param \Drupal\tripal\TripalDBX\TripalDbxConnection $connection
* A Tripal DBX connection object.
Expand Down Expand Up @@ -747,7 +747,7 @@ public function getTables(
;

$tables = [];
// Get original schema to differenciate base and custom.
// Get original schema to differentiate base and custom.
$schema_def = $this->getSchemaDef(['source' => 'file']);

// Check if tables should be filtered according to their origin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getTypes();
* - "value": a \Drupal\tripal\TripalStorage\StoragePropertyValue object
* - "type": a\Drupal\tripal\TripalStorage\StoragePropertyType object
* - "definition": a \Drupal\Field\Entity\FieldConfig object
* When the function returns, any values retreived from the data store
* When the function returns, any values retrieved from the data store
* will be set in the StoragePropertyValue object.
*
* @return bool
Expand All @@ -70,7 +70,7 @@ public function insertValues(&$values) : bool;
* - "value": a \Drupal\tripal\TripalStorage\StoragePropertyValue object
* - "type": a\Drupal\tripal\TripalStorage\StoragePropertyType object
* - "definition": a \Drupal\Field\Entity\FieldConfig object
* When the function returns, any values retreived from the data store
* When the function returns, any values retrieved from the data store
* will be set in the StoragePropertyValue object.
*
* @return bool
Expand Down
6 changes: 3 additions & 3 deletions tripal/src/TripalStorage/TripalEntityBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie

// Add loaded properties to their correct entity and field references
// Note: Each $property is an instance of StoragePropertyValue
// and thus contains information for it's associated entity ID/Type and
// and thus contains information for its associated entity ID/Type and
// field ID/Key.
foreach ($loaded as $property) {
$tid = $property->getEntityId();
Expand All @@ -121,8 +121,8 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie
$entity = $entityRef["entity"];
foreach ($entityRef as $fieldRef) {
$field = $fieldRef["field"];
// Finally we let the TripalField attach the it's loaded properties
// which allows another opprotunity for re-organization if needed.
// Finally we let the TripalField attach its loaded properties
// which allows another opportunity for re-organization if needed.
$field->tripalLoad($fieldRef["props"],$entity);
}
}
Expand Down
6 changes: 3 additions & 3 deletions tripal/src/api/tripal.importer.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function hook_importer_start($importer) {
/**
* Implements hook_importer_finish().
*
* This hook is executed once a TripalImporter has completed but it's run
* This hook is executed once a TripalImporter has completed both its run
* and post run activities. This allows modules to implement specific actions
* once loaders are completed.
*
Expand Down Expand Up @@ -138,7 +138,7 @@ function tripal_run_importer($import_id, TripalJob $job = NULL) {
$function($importer);
}

// @todo uncooment the section below once these functions are available.
// @todo uncomment the section below once these functions are available.

// Check for tables with new cvterms
// $logger->notice("Remapping Chado Controlled vocabularies to Tripal Terms...");
Expand Down Expand Up @@ -213,4 +213,4 @@ function tripal_run_importer_post_run($loader, $logger) {
$transaction->rollback();
throw $e;
}
}
}
18 changes: 9 additions & 9 deletions tripal/tests/src/Functional/Entity/EntityAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testTripalAccessOwnContentCheck() {
public function testTripalEntityAccessControlHandler() {

// One user per permission to check.
$user_unpriviledged = $this->drupalCreateUser([]);
$user_unprivileged = $this->drupalCreateUser([]);
$user_view = $this->drupalCreateUser(['view tripal content entities']);
$user_edit = $this->drupalCreateUser(['edit tripal content entities']);
$user_delete = $this->drupalCreateUser(['delete tripal content entities']);
Expand Down Expand Up @@ -74,8 +74,8 @@ public function testTripalEntityAccessControlHandler() {
$entity_type_interface = \Drupal::entityTypeManager()->getDefinition('tripal_entity');
$access_check_obj = new \Drupal\Tests\tripal\Functional\Entity\Subclass\TripalEntityAccessControlHandlerFake($entity_type_interface);

$result = $access_check_obj->returnProtectedCheckAccess($entity, 'view', $user_unpriviledged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unpriviledged user should NOT be allowed to VIEW the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'view', $user_unprivileged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unprivileged user should NOT be allowed to VIEW the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'view', $user_view);
$this->assertInstanceOf(AccessResultAllowed::class, $result, "A user with view permission should be allowed to VIEW the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'view', $user_edit);
Expand All @@ -85,8 +85,8 @@ public function testTripalEntityAccessControlHandler() {
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'view', $user_add);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with add permission should NOT be allowed to VIEW the entity.");

$result = $access_check_obj->returnProtectedCheckAccess($entity, 'update', $user_unpriviledged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unpriviledged user should NOT be allowed to UPDATE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'update', $user_unprivileged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unprivileged user should NOT be allowed to UPDATE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'update', $user_view);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with view permission should NOT be allowed to UPDATE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'update', $user_edit);
Expand All @@ -96,8 +96,8 @@ public function testTripalEntityAccessControlHandler() {
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'update', $user_add);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with add permission should NOT be allowed to UPDATE the entity.");

$result = $access_check_obj->returnProtectedCheckAccess($entity, 'delete', $user_unpriviledged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unpriviledged user should NOT be allowed to DELETE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'delete', $user_unprivileged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unprivileged user should NOT be allowed to DELETE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'delete', $user_view);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with view permission should be allowed to DELETE the entity.");
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'delete', $user_edit);
Expand All @@ -107,8 +107,8 @@ public function testTripalEntityAccessControlHandler() {
$result = $access_check_obj->returnProtectedCheckAccess($entity, 'delete', $user_add);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with add permission should NOT be allowed to DELETE the entity.");

$result = $access_check_obj->returnProtectedCheckCreateAccess($user_unpriviledged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unpriviledged user should NOT be allowed to CREATE the entity.");
$result = $access_check_obj->returnProtectedCheckCreateAccess($user_unprivileged);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "An unprivileged user should NOT be allowed to CREATE the entity.");
$result = $access_check_obj->returnProtectedCheckCreateAccess($user_view);
$this->assertInstanceOf(AccessResultNeutral::class, $result, "A user with view permission should NOT be allowed to CREATE the entity.");
$result = $access_check_obj->returnProtectedCheckCreateAccess($user_edit);
Expand Down

0 comments on commit 4055582

Please sign in to comment.