Skip to content

Commit

Permalink
DGIR-148 : Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-bd committed Jan 17, 2024
1 parent bfcec3f commit feba60b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion embargo.install
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* @file
* Install file.
*/

use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Update\UpdateException;

Expand All @@ -25,7 +30,8 @@ function embargo_update_8001() {

// Clear the cache.
drupal_flush_all_caches();
} catch (UpdateException $e) {
}
catch (UpdateException $e) {
// Handle exception if needed.
\Drupal::logger('embargo')->error('Error adding field: @error', ['@error' => $e->getMessage()]);
return t('Update failed: @error', ['@error' => $e->getMessage()]);
Expand Down
3 changes: 0 additions & 3 deletions embargo.module
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ function embargo_theme($existing, $type, $theme, $path) {
*/
function embargo_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if ($form_id == 'embargo_add_form' || $form_id == 'embargo_edit_form') {
// Get the current value of the embargo_type field.
$embargo_type_value = $form_state->getValue('embargo_type');

// Set up visibility conditions for the embargoed_file field.
$form['embargoed_file']['#states'] = [
'visible' => [
Expand Down

0 comments on commit feba60b

Please sign in to comment.