public function PullForm::importChannel in Entity Share 8.3
Form submission handler for the 'Import the whole channel' action.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
- modules/
entity_share_client/ src/ Form/ PullForm.php, line 310
Class
- PullForm
- Form controller to pull entities.
Namespace
Drupal\entity_share_client\FormCode
public function importChannel(array &$form, FormStateInterface $form_state) {
$storage = $form_state
->getStorage();
if (isset($storage['remote_channel_count'])) {
$remote_id = $form_state
->getValue('remote');
$channel_id = $form_state
->getValue('channel');
$import_config_id = $form_state
->getValue('import_config');
$import_context = new ImportContext($remote_id, $channel_id, $import_config_id);
$import_context
->setRemoteChannelCount($storage['remote_channel_count']);
$this->importService
->importChannel($import_context);
}
}