PHP Class PartKeepr\SetupBundle\Services\FootprintSetupService

Afficher le fichier Open project: partkeepr/PartKeepr

Méthodes publiques

Méthode Description
__construct ( EntityManager $entityManager, CategoryService $categoryService, UploadedFileService $uploadedFileService, Symfony\Component\HttpKernel\KernelInterface $kernel )
importFootprints ( ) : array Imports the existing footprints. Skips existing footprints.

Méthodes protégées

Méthode Description
addFootprintCategoryPath ( array $path, FootprintCategory $parentNode ) : FootprintCategory Creates a node structure for the given path.
createFootprint ( $footprintName, $footprintData )
footprintExists ( string $name ) : boolean Checks if the specified footprint exists.

Method Details

__construct() public méthode

public __construct ( EntityManager $entityManager, CategoryService $categoryService, UploadedFileService $uploadedFileService, Symfony\Component\HttpKernel\KernelInterface $kernel )
$entityManager Doctrine\ORM\EntityManager
$categoryService PartKeepr\CategoryBundle\Services\CategoryService
$uploadedFileService PartKeepr\UploadedFileBundle\Services\UploadedFileService
$kernel Symfony\Component\HttpKernel\KernelInterface

addFootprintCategoryPath() protected méthode

Creates a node structure for the given path.
protected addFootprintCategoryPath ( array $path, FootprintCategory $parentNode ) : FootprintCategory
$path array array The components of the path
$parentNode PartKeepr\FootprintBundle\Entity\FootprintCategory FootprintCategory The parent node
Résultat PartKeepr\FootprintBundle\Entity\FootprintCategory

createFootprint() protected méthode

protected createFootprint ( $footprintName, $footprintData )

footprintExists() protected méthode

Checks if the specified footprint exists.
protected footprintExists ( string $name ) : boolean
$name string The footprint name
Résultat boolean true if the footprints exists, false otherwise

importFootprints() public méthode

Imports the existing footprints. Skips existing footprints.
public importFootprints ( ) : array
Résultat array An array with the keys "skipped" and "imported" which contain the number of footprints skipped and imported