1. Go to this page and download the library: Download bigfoot/import-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
php
/* Controller/DefaultController.php */
public function indexAction()
{
$em = $this->container->get('doctrine.orm.default_entity_manager');
/* Where 'nameOfTheFtpConfiguration' is the name you entered for the FTP configuration */
$object = $em->getRepository('BigfootImportBundle:DataSource')->findOneBy(array('name' => 'nameOfTheFtpConfiguration'));
$client = $this->get('bigfoot_import.client');
$client->init($object->getDomain());
$client->setAuth($object->getUsername(),$object->getPassword());
$parser = $this->get('bigfoot_import.csvparser');
$parser->setClient($client);
$parser->setDelimiter(';');
/* Name of your csv file in the FTP */
$data = $parser->parse('nameofthecsvfile.csv');
/* Name of the service */
$dataMapper = $this->get('bigfoot_qualitelis.note_datamapper');
$dataMapper->setData($data);
/* Name of your entity */
$dataMapper->className = 'QualitelisNote';
$dataMapper->map();
return new Response();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.