Builds search form for entity sources overview.
array $form: Drupal form array.
FormStateInterface $form_state: Drupal form_state array.
string $type: Entity type.
array Drupal form array.
public function overviewSearchFormPart(array $form, FormStateInterface $form_state, $type) {
// Add entity type and plugin_id value into form array
// so that it is available in the form alter hook.
$form_state
->set('entity_type', $type);
$form_state
->set('plugin_id', $this->pluginId);
// Add search form specific styling.
$form['#attached']['library'][] = 'tmgmt/source_search_form';
$form['search_wrapper'] = array(
'#prefix' => '<div class="tmgmt-sources-wrapper">',
'#suffix' => '</div>',
'#weight' => -15,
);
$form['search_wrapper']['search'] = array(
'#tree' => TRUE,
);
$form['search_wrapper']['search_submit'] = array(
'#type' => 'submit',
'#value' => t('Search'),
'#weight' => 90,
);
$form['search_wrapper']['search_cancel'] = array(
'#type' => 'submit',
'#value' => t('Cancel'),
'#weight' => 100,
);
return $form;
}