WellCommerce\Bundle\ProductBundle\Entity\ProductInterface::getSku PHP Method

getSku() public method

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

Usage Example

Exemplo n.º 1
0
 public function getFieldsCollection() : Collection
 {
     $accessor = PropertyAccess::createPropertyAccessor();
     $fields = new ArrayCollection();
     $translations = $this->product->getTranslations();
     foreach ($translations as $locale => $translation) {
         $fields->add(new SearchField('name_' . $locale, $accessor->getValue($translation, 'name')));
         $fields->add(new SearchField('description_' . $locale, $accessor->getValue($translation, 'description')));
         $fields->add(new SearchField('short_description' . $locale, $accessor->getValue($translation, 'shortDescription')));
     }
     $fields->add(new SearchField('sku', $this->product->getSku()));
     return $fields;
 }