WellCommerce\Bundle\LocaleBundle\Entity\LocaleInterface::getCode PHP Method

getCode() public method

public getCode ( ) : string
return string
    public function getCode() : string;

Usage Example

Ejemplo n.º 1
0
 private function duplicateTranslatableEntity(LocaleAwareInterface $entity, array $properties, LocaleInterface $targetLocale)
 {
     $duplicate = clone $entity;
     foreach ($properties as $propertyName) {
         $value = sprintf('%s-%s', $this->propertyAccessor->getValue($entity, $propertyName), $targetLocale->getCode());
         $this->propertyAccessor->setValue($duplicate, $propertyName, $value);
         $duplicate->setLocale($targetLocale->getCode());
         $this->doctrineHelper->getEntityManager()->persist($duplicate);
     }
 }
All Usage Examples Of WellCommerce\Bundle\LocaleBundle\Entity\LocaleInterface::getCode
LocaleInterface