Loading src/Element/SelectIcons.php +3 −0 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\select_icons\Element; use Drupal\Core\Render\Element\Select; Loading Loading @@ -34,4 +36,5 @@ class SelectIcons extends Select { return $info; } } tests/modules/select_icons_test/src/Form/SelectIconsFormElementTestForm.php +8 −6 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\select_icons_test\Form; use Drupal\Core\Form\FormBase; Loading @@ -26,8 +28,8 @@ class SelectIconsFormElementTestForm extends FormBase { $form['select_icons_select'] = [ '#type' => 'select_icons', '#attributes' => ['id' => 'select-icons-test-element'], '#title' => t('Color'), '#options' => [ 'r' => t('Red'), 'g' => t('Green'), 'b' => t('Blue') ], '#title' => \t('Color'), '#options' => ['r' => \t('Red'), 'g' => \t('Green'), 'b' => \t('Blue')], '#options_attributes' => [ 'r' => new Attribute(['data-class' => ['colour', 'red']]), 'g' => new Attribute(['data-class' => ['colour', 'green']]), Loading tests/src/FunctionalJavascript/SelectIconsElementIntegrationTest.php +8 −6 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\Tests\select_icons\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; /** * Tests the JavaScript select_icons - jquery selectmenu widget. Loading @@ -18,7 +20,7 @@ class SelectIconsElementIntegrationTest extends JavascriptTestBase { // 'system', // 'block', 'select_icons', 'select_icons_test' 'select_icons_test', ]; /** Loading Loading
src/Element/SelectIcons.php +3 −0 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\select_icons\Element; use Drupal\Core\Render\Element\Select; Loading Loading @@ -34,4 +36,5 @@ class SelectIcons extends Select { return $info; } }
tests/modules/select_icons_test/src/Form/SelectIconsFormElementTestForm.php +8 −6 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\select_icons_test\Form; use Drupal\Core\Form\FormBase; Loading @@ -26,8 +28,8 @@ class SelectIconsFormElementTestForm extends FormBase { $form['select_icons_select'] = [ '#type' => 'select_icons', '#attributes' => ['id' => 'select-icons-test-element'], '#title' => t('Color'), '#options' => [ 'r' => t('Red'), 'g' => t('Green'), 'b' => t('Blue') ], '#title' => \t('Color'), '#options' => ['r' => \t('Red'), 'g' => \t('Green'), 'b' => \t('Blue')], '#options_attributes' => [ 'r' => new Attribute(['data-class' => ['colour', 'red']]), 'g' => new Attribute(['data-class' => ['colour', 'green']]), Loading
tests/src/FunctionalJavascript/SelectIconsElementIntegrationTest.php +8 −6 Original line number Diff line number Diff line <?php declare(strict_types = 1); namespace Drupal\Tests\select_icons\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; /** * Tests the JavaScript select_icons - jquery selectmenu widget. Loading @@ -18,7 +20,7 @@ class SelectIconsElementIntegrationTest extends JavascriptTestBase { // 'system', // 'block', 'select_icons', 'select_icons_test' 'select_icons_test', ]; /** Loading