Commit 57b5f0da authored by renatog's avatar renatog Committed by renatog
Browse files

Issue #3271403 by RenatoG: Fix the Drupal Coding Standards

parent cad2b950
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -140,7 +140,6 @@ class BlockClassController extends ControllerBase {

    $page = (int) 1;


    if (!empty($_GET['page'])) {
      $page = (int) $_GET['page'];
    }
+6 −5
Original line number Diff line number Diff line
@@ -317,7 +317,8 @@ class BlockClassBulkOperationsForm extends ConfigFormBase {
          return;
        }

        // If there is a settings to allow only letters and numbers, validate this.
        // If there is a settings to allow only letters and numbers, validate
        // this.
        if (empty($config->get('allow_only_letters_and_numbers'))) {
          return FALSE;
        }
@@ -401,8 +402,8 @@ class BlockClassBulkOperationsForm extends ConfigFormBase {
        // Get the default case in the settings area.
        $default_case = $config->get('default_case');

        // If is configure lowercase we can't run the bulk operation to Uppercase
        // So show this message.
        // If is configure lowercase we can't run the bulk operation to
        // Uppercase so show this message.
        if ($default_case == 'lowercase') {

          $form_state->setErrorByName('operation', $this->t('You selected to convert all classes to lowercase but your configuration is to use all with Uppercase. Please see you settings <a href="/admin/config/content/block-class/settings">here</a>'));
@@ -421,8 +422,8 @@ class BlockClassBulkOperationsForm extends ConfigFormBase {
        // Get the default case in the settings area.
        $default_case = $config->get('default_case');

        // If is configure uppercase we can't run the bulk operation to lowercase
        // So show this message.
        // If is configure uppercase we can't run the bulk operation to
        // lowercase so show this message.
        if ($default_case == 'uppercase') {

          $form_state->setErrorByName('operation', $this->t('You selected to convert all classes to lowercase but your configuration is to use all with Uppercase. Please see you settings <a href="/admin/config/content/block-class/settings">here</a>'));
+4 −4
Original line number Diff line number Diff line
@@ -413,8 +413,8 @@ class BlockClassHelperService {
        $classes = explode(' ', $classes);

        // If the quantity of items in the block is lower than the quantity of
        // items configured in the settings we need to have the higher limit just
        // to avoid some items being cut due the limit.
        // items configured in the settings we need to have the higher limit
        // just to avoid some items being cut due the limit.
        if ((int) $qty_classes_per_block < (int) count($classes)) {
          $qty_classes_per_block = (int) count($classes);
        }
@@ -454,7 +454,8 @@ class BlockClassHelperService {

            $form['class']['third_party_settings']['block_class']['classes_' . $index]['#attributes']['class'][] = 'hidden-class-field';

            // If this class should be hidden, get the key to put the right class on that.
            // If this class should be hidden, get the key to put the right
            // class on that.
            $hidden_class_key = array_search('displayed-class-field', $form['class']['third_party_settings']['block_class']['classes_' . $index]['#attributes']['class']);

            // Unset in the array to remove the hidden class.
@@ -754,7 +755,6 @@ class BlockClassHelperService {
      }
    }


  }

}