PHP Class WellCommerce\Bundle\RoutingBundle\Generator\SlugGenerator

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Bundle\RoutingBundle\Generator\SlugGeneratorInterface
Exibir arquivo Open project: wellcommerce/wellcommerce

Public Methods

Method Description
__construct ( WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $manager ) SlugGenerator constructor.
generate ( string $name, $id, string $locale, $values, integer $iteration ) : string

Private Methods

Method Description
hasRouteSameLocaleAndId ( WellCommerce\Bundle\RoutingBundle\Entity\RouteInterface $route, string $locale, $id ) : boolean Checks passed identifier and locale against those in route
makeSlugIterated ( string $slug, integer $iteration ) : string Makes original slug iterated

Method Details

__construct() public method

SlugGenerator constructor.
public __construct ( WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $manager )
$manager WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface

generate() public method

public generate ( string $name, $id, string $locale, $values, integer $iteration ) : string
$name string
$locale string
$iteration integer
return string