You are here

protected function StaticFieldsForm::getStaticField in Feed Import 8

Returns a row for static fields table.

Parameters

string $val: Default field value

string $name: Field name

Return value

array A row for table

1 call to StaticFieldsForm::getStaticField()
StaticFieldsForm::buildForm in src/Form/StaticFieldsForm.php
Form constructor.

File

src/Form/StaticFieldsForm.php, line 218
Contains \Drupal\feed_import\Form\StaticFieldsForm

Class

StaticFieldsForm

Namespace

Drupal\feed_import\Form

Code

protected function getStaticField($val = NULL, $name = NULL) {
  return array(
    'field_name' => Html::escape($name),
    'field_value' => array(
      'data' => array(
        '#type' => 'textfield',
        '#maxlength' => 2048,
        '#value' => $val,
        '#name' => 'field|' . $name,
      ),
    ),
  );
}