Skip to content
Snippets Groups Projects

Issue #3169169: Use static::class to refer to class names

Merged Chhavi Sharma requested to merge issue/tablefield-3169169:3169169-dont-hardcode-ajax into 3.0.x
1 file
+ 7
7
Compare changes
  • Side-by-side
  • Inline
@@ -157,14 +157,14 @@ class Tablefield extends FormElementBase {
'#attributes' => [
'class' => ['tablefield-addrow'],
],
'#submit' => [[get_called_class(), 'submitCallbackRebuild']],
'#submit' => [[static::class, 'submitCallbackRebuild']],
'#limit_validation_errors' => [
array_merge($parents, ['tablefield', 'rebuild', 'cols']),
array_merge($parents, ['tablefield', 'rebuild', 'rows']),
array_merge($parents, ['tablefield', 'rebuild', 'rebuild']),
],
'#ajax' => [
'callback' => 'Drupal\tablefield\Element\Tablefield::ajaxCallbackRebuild',
'callback' => [static::class, 'ajaxCallbackRebuild'],
'progress' => ['type' => 'throbber', 'message' => NULL],
'wrapper' => 'tablefield-' . $id . '-wrapper',
'effect' => 'fade',
@@ -215,14 +215,14 @@ class Tablefield extends FormElementBase {
'#attributes' => [
'class' => ['tablefield-rebuild'],
],
'#submit' => [[get_called_class(), 'submitCallbackRebuild']],
'#submit' => [[static::class, 'submitCallbackRebuild']],
'#limit_validation_errors' => [
array_merge($parents, ['tablefield', 'rebuild', 'cols']),
array_merge($parents, ['tablefield', 'rebuild', 'rows']),
array_merge($parents, ['tablefield', 'rebuild', 'rebuild']),
],
'#ajax' => [
'callback' => 'Drupal\tablefield\Element\Tablefield::ajaxCallbackRebuild',
'callback' => [static::class, 'ajaxCallbackRebuild'],
'progress' => ['type' => 'throbber', 'message' => NULL],
'wrapper' => 'tablefield-' . $id . '-wrapper',
'effect' => 'fade',
@@ -265,7 +265,7 @@ class Tablefield extends FormElementBase {
$element['tablefield']['paste']['paste_import'] = [
'#type' => 'submit',
'#submit' => [[get_called_class(), 'submitCallbackRebuild']],
'#submit' => [[static::class, 'submitCallbackRebuild']],
'#value' => t('Import & Rebuild'),
'#name' => 'tablefield-paste-' . $id,
'#attributes' => [
@@ -304,13 +304,13 @@ class Tablefield extends FormElementBase {
'#attributes' => [
'class' => ['tablefield-rebuild'],
],
'#submit' => [[get_called_class(), 'submitCallbackRebuild']],
'#submit' => [[static::class, 'submitCallbackRebuild']],
'#limit_validation_errors' => [
array_merge($parents, ['tablefield', 'import', 'csv']),
array_merge($parents, ['tablefield', 'import', 'import']),
],
'#ajax' => [
'callback' => 'Drupal\tablefield\Element\Tablefield::ajaxCallbackRebuild',
'callback' => [static::class, 'ajaxCallbackRebuild'],
'progress' => ['type' => 'throbber', 'message' => NULL],
'wrapper' => 'tablefield-' . $id . '-wrapper',
'effect' => 'fade',
Loading