I would like to know in what form I can call (Summon a content type) to a form of multiple selection type in drupal 8. The idea is that each item of the field has preloaded the type of content that is going to be saved according to its Title.
Code:
public function buildForm(array $form, FormStateInterface $form_state) {
$form['employee_name'] = array(
'#type' => 'textfield',
'#title' => t('Employee Name:'),
//'id' => 'edit-select-user',
'#required' => TRUE,
'#attributes' => array(
'id' => 'edit-select-user',
'style' => 'width:600px',
),
);
$form['default_value']['widget'][1] = array(
'#title' => $this->t('Your favorite serie:'),
**'#type' => 'select',
'#multiple' => TRUE,**
'#attributes' => array(
'id' => 'edit-select-user',
'style' => 'width:600px',
),
'#options' => [
'small' => $this->t('Vikingos'),//Aqui necesito que me invoque al contenido perteneciente a un tipo de contenido especifico
'medium' => $this->t('Rridiculousness'),
'large' => $this->t('Xscape'),
],
);
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => $this->t('Register'),
'#button_type' => 'primary',
);
return $form;
}