Boolean.php in Smart Date 3.1.x
File
src/FormElement/Boolean.php
View source
<?php
namespace Drupal\smart_date\FormElement;
use Drupal\Core\Language\LanguageInterface;
use Drupal\config_translation\FormElement\FormElementBase;
class Boolean extends FormElementBase {
public function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) {
return [
'#type' => 'checkbox',
'#return_value' => '1',
] + parent::getTranslationElement($translation_language, $source_config, $translation_config);
}
}
Classes
Name |
Description |
Boolean |
Defines the boolean element for the configuration translation interface. |