PHP Class WellCommerce\Bundle\AdminBundle\Provider\AdminMenuProvider

Author: Adam Piotrowski ([email protected])
Mostrar archivo Open project: wellcommerce/wellcommerce Class Usage Examples

Protected Properties

Property Type Description
$adminMenuRepository WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface
$kernel Symfony\Component\HttpKernel\KernelInterface

Public Methods

Method Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface $repository ) AdminMenuProvider constructor.
getMenu ( )

Protected Methods

Method Description
filterElements ( Doctrine\Common\Collections\Collection $collection, WellCommerce\Bundle\AdminBundle\Entity\AdminMenuInterface $parent = null ) : Doctrine\Common\Collections\Collection Filters the collection and returns only children elements for given parent element
generateMenu ( )
generateTree ( Doctrine\Common\Collections\Collection $collection, Doctrine\Common\Collections\Collection $children ) : array Generates a tree for given children elements
writeCache ( array $menu )

Method Details

__construct() public method

AdminMenuProvider constructor.
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface $repository )
$kernel Symfony\Component\HttpKernel\KernelInterface
$repository WellCommerce\Bundle\AdminBundle\Repository\AdminMenuRepositoryInterface

filterElements() protected method

Filters the collection and returns only children elements for given parent element
protected filterElements ( Doctrine\Common\Collections\Collection $collection, WellCommerce\Bundle\AdminBundle\Entity\AdminMenuInterface $parent = null ) : Doctrine\Common\Collections\Collection
$collection Doctrine\Common\Collections\Collection
$parent WellCommerce\Bundle\AdminBundle\Entity\AdminMenuInterface
return Doctrine\Common\Collections\Collection

generateMenu() protected method

protected generateMenu ( )

generateTree() protected method

Generates a tree for given children elements
protected generateTree ( Doctrine\Common\Collections\Collection $collection, Doctrine\Common\Collections\Collection $children ) : array
$collection Doctrine\Common\Collections\Collection
$children Doctrine\Common\Collections\Collection
return array

getMenu() public method

public getMenu ( )

writeCache() protected method

protected writeCache ( array $menu )
$menu array

Property Details

$adminMenuRepository protected_oe property

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

$kernel protected_oe property

protected KernelInterface,Symfony\Component\HttpKernel $kernel
return Symfony\Component\HttpKernel\KernelInterface