'name' => 'entity',
'data_type' => 'String',
],
+ [
+ 'name' => 'localizable',
+ 'data_type' => 'Boolean',
+ 'default_value' => FALSE,
+ ],
[
'name' => 'readonly',
'data_type' => 'Boolean',
$field->setRequired(!empty($data['required']) && empty($data['default']));
$field->setTitle($data['title'] ?? NULL);
$field->setLabel($data['html']['label'] ?? NULL);
+ $field->setLocalizable($data['localizable'] ?? FALSE);
if (!empty($data['pseudoconstant'])) {
// Do not load options if 'prefetch' is explicitly FALSE
if (!isset($data['pseudoconstant']['prefetch']) || $data['pseudoconstant']['prefetch'] === FALSE) {
*/
public $inputType;
+ /**
+ * Can the field be translated.
+ *
+ * @var bool
+ */
+ public $localizable = FALSE;
+
/**
* @var array
*/
return $this;
}
+ /**
+ * @return bool
+ */
+ public function getLocalizable() {
+ return $this->localizable;
+ }
+
+ /**
+ * @param bool $localizable
+ *
+ * @return $this
+ */
+ public function setLocalizable(bool $localizable) {
+ $this->localizable = $localizable;
+ return $this;
+ }
+
/**
* @param string $label
*