PHP Class WellCommerce\Bundle\AdminBundle\Importer\XmlImporter

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Bundle\AdminBundle\Importer\AdminMenuImporterInterface
Show file Open project: wellcommerce/wellcommerce

Protected Properties

Property Type Description
$adminMenuFactory WellCommerce\Bundle\AdminBundle\Factory\AdminMenuFactory
$adminMenuRepository WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface
$doctrineHelper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface

Public Methods

Method Description
__construct ( WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $doctrineHelper, AdminMenuFactory $adminMenuFactory, WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface $adminMenuRepository ) Constructor
import ( $file, Symfony\Component\Config\FileLocatorInterface $locator )

Protected Methods

Method Description
addMenuItem ( SimpleXMLElement $item ) Creates new admin menu item
importItems ( DOMDocument $xml ) Parses DOM element and adds it as an admin menu item
parseFile ( string $file ) : DOMDocument Parses a XML file

Method Details

__construct() public method

Constructor
public __construct ( WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface $doctrineHelper, AdminMenuFactory $adminMenuFactory, WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface $adminMenuRepository )
$doctrineHelper WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface
$adminMenuFactory WellCommerce\Bundle\AdminBundle\Factory\AdminMenuFactory
$adminMenuRepository WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface

addMenuItem() protected method

Creates new admin menu item
protected addMenuItem ( SimpleXMLElement $item )
$item SimpleXMLElement

import() public method

public import ( $file, Symfony\Component\Config\FileLocatorInterface $locator )
$locator Symfony\Component\Config\FileLocatorInterface

importItems() protected method

Parses DOM element and adds it as an admin menu item
protected importItems ( DOMDocument $xml )
$xml DOMDocument

parseFile() protected method

Parses a XML file
protected parseFile ( string $file ) : DOMDocument
$file string
return DOMDocument

Property Details

$adminMenuFactory protected property

protected AdminMenuFactory,WellCommerce\Bundle\AdminBundle\Factory $adminMenuFactory
return WellCommerce\Bundle\AdminBundle\Factory\AdminMenuFactory

$adminMenuRepository protected property

protected AdminMenuRepositoryInterface,WellCommerce\Bundle\AdminBundle\Repository $adminMenuRepository
return WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface

$doctrineHelper protected property

protected DoctrineHelperInterface,WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine $doctrineHelper
return WellCommerce\Bundle\DoctrineBundle\Helper\Doctrine\DoctrineHelperInterface