Import guardians.

@param \Cortex\Auth\Models\Guardian                         $guardian
@param \Cortex\Foundation\DataTables\ImportRecordsDataTable $importRecordsDataTable

@return \Illuminate\View\View
329490
public function import(Guardian $guardian, ImportRecordsDataTable $importRecordsDataTable)
    {
        return $importRecordsDataTable->with([
            'resource' => $guardian,
            'tabs' => 'adminarea.guardians.tabs',
            'url' => route('adminarea.guardians.stash'),
            'id' => "adminarea-attributes-{$guardian->getRouteKey()}-import-table",
        ])->render('cortex/foundation::adminarea.pages.datatable-dropzone');
    }
388533
public function importMerchantRelationshipProductList(
        ?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null
    ): DataImporterReportTransfer {
        return $this->getFactory()->createMerchantRelationshipProductListDataImport()->import($dataImporterConfigurationTransfer);
    }
134462
public function importProvider(ResourceProviderInterface $provider, array $values = [])
    {
        $provider->populate($this);
        $this->importValues($values);
    }
1318289
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createCompanyDataImport()->import($dataImporterConfigurationTransfer);
    }
1275507
public function importShoppingLists(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()
            ->getShoppingListDataImporter()
            ->import($dataImporterConfigurationTransfer);
    }
1371561
public function importShoppingListItems(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()
            ->getShoppingListItemDataImporter()
            ->import($dataImporterConfigurationTransfer);
    }
765044
public function importProductList(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()
            ->createProductListDataImport()
            ->import($dataImporterConfigurationTransfer);
    }
1063858
public function getOrdersToImport($storeIds, $limit, $orderStatuses)
    {
        return $this->getCollection()
            ->getOrdersToImport($storeIds, $limit, $orderStatuses);
    }
840741
public function importAction(ResourceNode $directory)
    {
        $form = $this->formFactory->create(new ImportResourcesType());
        $form->handleRequest($this->request);

        /*try {*/
            if ($form->isValid()) {
                $template = $form->get('file')->getData();
                $config = Configuration::fromTemplate($template);
                $user = $this->tokenStorage->getToken()->getUser();
                $this->transferManager->importResources($config, $user, $directory);
                $this->transferManager->importRichText();

                return new JsonResponse(array());
            } else {

                return array('form' => $form->createView(), 'directory' => $directory);
            }/*
        } catch (\Exception $e) {
            $errorMsg = $this->translator->trans(
                'invalid_file',
                array(),
                'platform'
            );
            $form->addError(new FormError($e->getMessage()));*/

            return array('form' => $form->createView(), 'directory' => $directory);
        //}
    }
873485
public function import(Event $event, ImportRecordsDataTable $importRecordsDataTable)
    {
        return $importRecordsDataTable->with([
            'resource' => $event,
            'tabs' => 'adminarea.events.tabs',
            'url' => route('adminarea.events.stash'),
            'id' => "adminarea-events-{$event->getRouteKey()}-import-table",
        ])->render('cortex/foundation::adminarea.pages.datatable-dropzone');
    }
950405
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createCompanyUnitAddressLabelDataImport()->import($dataImporterConfigurationTransfer);
    }
634255
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createPriceProductMerchantRelationshipDataImport()->import($dataImporterConfigurationTransfer);
    }
41604
public function import($resource)
    {
        if ($this->supports($resource)) {
            return $this->load($resource);
        }

        if (null === $res = $this->getResolver()) {
            throw LoaderException::missingLoader($resource);
        }

        try {
            $loader = $res->resolve($resource);
        } catch (LoaderException $e) {
            throw new LoaderException($e->getMessage(), $e->getCode(), $e);
        }

        $loader->load($resource);
    }
222555
protected function createImport($name, $filename, $record)
    {
        // This is needed to feed WorkflowService#getNamedTemplate()
        $import = ImportedWorkflowTemplate::create();
        $import->Name = $name;
        $import->Filename = $filename;
        $import->Content = serialize($record);
        $import->write();

        return $import;
    }
1069506
protected function process(FormRequest $request, Guardian $guardian)
    {
        // Prepare required input fields
        $data = $request->validated();

        // Save guardian
        $guardian->fill($data)->save();

        return intend([
            'url' => route('adminarea.guardians.index'),
            'with' => ['success' => trans('cortex/foundation::messages.resource_saved', ['resource' => trans('cortex/auth::common.guardian'), 'identifier' => $guardian->username])],
        ]);
    }
1172489
public function importCompanyUserRoles(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createCompanyUserRoleDataImport()->import($dataImporterConfigurationTransfer);
    }
229447
public function importProductPackagingUnitTypes(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createProductPackagingUnitTypeDataImport()->import($dataImporterConfigurationTransfer);
    }