public function ModalPageFieldHelper::getFieldDontShowAgainLabel in Modal 8.3
Get "Don't show again label".
File
- src/
Helper/ ModalPageFieldHelper.php, line 41
Class
- ModalPageFieldHelper
- Modal Page Field Helper.
Namespace
Drupal\modal_page\HelperCode
public function getFieldDontShowAgainLabel() {
$dontShowAgainLabel = BaseFieldDefinition::create('string');
$dontShowAgainLabel
->setLabel($this
->t("Label"));
$dontShowAgainLabel
->setDefaultValue($this
->t("Don't show again"));
$dontShowAgainLabel
->setDescription($this
->t("If blank the value will be <b>Don't show again</b>"));
$dontShowAgainLabel
->setDisplayConfigurable('form', TRUE);
$dontShowAgainLabel
->setDisplayConfigurable('view', TRUE);
$dontShowAgainLabel
->setSettings([
'max_length' => 255,
'text_processing' => 0,
]);
$dontShowAgainLabel
->setDisplayOptions('form', [
'type' => 'string_textfield',
'weight' => -5,
]);
$dontShowAgainLabel
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => -5,
]);
return $dontShowAgainLabel;
}