Skip to content
Snippets Groups Projects

Issue #3517944 by eduardo morales alberti: Solve coding standards and deprecations

Compare and
45 files
+ 288
152
Compare changes
  • Side-by-side
  • Inline
Files
45
@@ -66,7 +66,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
@@ -66,7 +66,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
* @return array
* @return array
* Animations processed.
* Animations processed.
*/
*/
protected function animationsTreeValuesProccesed(array $animations) {
protected function animationsTreeValuesProcessed(array $animations) {
$animations_processed = [];
$animations_processed = [];
foreach ($animations as $animation_delta => $animation) {
foreach ($animations as $animation_delta => $animation) {
$animations_processed[$animation_delta]['identifier'] = $animation['identifier'];
$animations_processed[$animation_delta]['identifier'] = $animation['identifier'];
@@ -86,7 +86,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
@@ -86,7 +86,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
* Form state.
* Form state.
*/
*/
public function addAnimation(array $form, FormStateInterface $form_state) {
public function addAnimation(array $form, FormStateInterface $form_state) {
$animations = $this->animationsTreeValuesProccesed($form_state->getValue('animations', []));
$animations = $this->animationsTreeValuesProcessed($form_state->getValue('animations', []));
$animations[] = [];
$animations[] = [];
$form_state->set('animations', $animations);
$form_state->set('animations', $animations);
$form_state->setRebuild();
$form_state->setRebuild();
@@ -102,7 +102,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
@@ -102,7 +102,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
*/
*/
public function removeAnimation(array $form, FormStateInterface $form_state) {
public function removeAnimation(array $form, FormStateInterface $form_state) {
$animation_delta = $form_state->getTriggeringElement()['#animation_delta'];
$animation_delta = $form_state->getTriggeringElement()['#animation_delta'];
$animations = $this->animationsTreeValuesProccesed($form_state->getValue('animations', []));
$animations = $this->animationsTreeValuesProcessed($form_state->getValue('animations', []));
unset($animations[$animation_delta]);
unset($animations[$animation_delta]);
$form_state->set('animations', $animations);
$form_state->set('animations', $animations);
$form_state->setRebuild();
$form_state->setRebuild();
@@ -175,7 +175,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
@@ -175,7 +175,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
'#tree' => FALSE,
'#tree' => FALSE,
'#attributes' => ['class' => ['button--danger']],
'#attributes' => ['class' => ['button--danger']],
'#value' => $this->t('Remove animation'),
'#value' => $this->t('Remove animation'),
'#suffix' => $this->t('WARNING! Make sure no usement before removing.'),
'#suffix' => $this->t('WARNING! Make sure no usage before removing.'),
'#submit' => ['::removeAnimation'],
'#submit' => ['::removeAnimation'],
'#name' => 'animation_remove_animation_' . $delta,
'#name' => 'animation_remove_animation_' . $delta,
'#animation_delta' => $delta,
'#animation_delta' => $delta,
@@ -253,7 +253,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
@@ -253,7 +253,7 @@ final class VLSuiteAnimationsSettingsForm extends ConfigFormBase {
$form['basics']['main_classes'] = [
$form['basics']['main_classes'] = [
'#type' => 'textfield',
'#type' => 'textfield',
'#required' => TRUE,
'#required' => TRUE,
'#title' => $this->t('Main class (or classes) to add along with the animation spicific one'),
'#title' => $this->t('Main class (or classes) to add along with the animation specific one'),
'#description' => $this->t('Example "animate__animated". Separated by " " when multiple.'),
'#description' => $this->t('Example "animate__animated". Separated by " " when multiple.'),
'#default_value' => $this->configFactory->get('vlsuite_animations.settings')->get('main_classes'),
'#default_value' => $this->configFactory->get('vlsuite_animations.settings')->get('main_classes'),
];
];
Loading