Skip to content

Commit

Permalink
De-lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonhildebrand committed Sep 10, 2024
1 parent 65f4dc7 commit eb40ab0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function defaultConfiguration() {
$config = parent::defaultConfiguration();
$config['mimetype'] = 'image/jpeg';
$config['path'] = '[date:custom:Y]-[date:custom:m]/[node:nid].jpg';
$config['destination_media_type'] = 'image';
$config['destination_media_type'] = 'image';
$config['inputargs'] = '';
return $config;
}
Expand All @@ -35,7 +35,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
$form = parent::buildConfigurationForm($form, $form_state);
$form['mimetype']['#description'] = $this->t('Mimetype to convert to (e.g. image/jpeg, image/png, etc...)');

// adjust args title and description for better clarity
// Adjust args title and description for better clarity.
$form['args']['#title'] = $this->t('Additional output arguments');
$form['args']['#description'] = $this->t('Additional output options for ImageMagick convert (e.g. -resize 50% -unsharp 0x.5).<br>See <a target="_blank" href="https://imagemagick.org/script/convert.php">documentation</a> for available options.');

Expand All @@ -46,7 +46,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
'#default_value' => $this->configuration['inputargs'],
'#rows' => '8',
'#description' => $this->t('Additional input options for ImageMagick convert (e.g. -density 144).<br>Check the <a target="_blank" href="https://manpages.ubuntu.com/manpages/trusty/man1/convert.im6.1.html">man page</a> to see which options are input options.'),
]
],
];
$form = $this->utils->array_insert_after($form, 'mimetype', $new);
return $form;
Expand Down Expand Up @@ -75,4 +75,5 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
parent::submitConfigurationForm($form, $form_state);
$this->configuration['inputargs'] = $form_state->getValue('inputargs');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
compatible with the destination image field.';
$form['mimetype']['#type'] = 'hidden';

// adjust args title and description for better clarity
// Adjust args title and description for better clarity.
$form['args']['#title'] = $this->t('Additional output arguments');
$form['args']['#description'] = $this->t('Additional output options for ImageMagick convert (e.g. -resize 50% -unsharp 0x.5).<br>See <a target="_blank" href="https://imagemagick.org/script/convert.php">documentation</a> for available options.');

Expand All @@ -74,9 +74,10 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
'#default_value' => $this->configuration['inputargs'],
'#rows' => '8',
'#description' => $this->t('Additional input options for ImageMagick convert (e.g. -density 144).<br>Check the <a target="_blank" href="https://manpages.ubuntu.com/manpages/trusty/man1/convert.im6.1.html">man page</a> to see which options are input options.'),
]
],
];
$form = $this->utils->array_insert_after($form, 'mimetype', $new);

return $form;
}

Expand All @@ -87,4 +88,5 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
parent::submitConfigurationForm($form, $form_state);
$this->configuration['inputargs'] = $form_state->getValue('inputargs');
}

}

0 comments on commit eb40ab0

Please sign in to comment.