/**
  * {@inheritdoc}
  * @return AttributeGroupInterface
  */
 protected function createEntity(array $data)
 {
     $group = new AttributeGroup();
     $group->setCode($data['code']);
     foreach ($this->getLabels($data) as $locale => $label) {
         $translation = $group->getTranslation($locale);
         $translation->setLabel($label);
         $group->addTranslation($translation);
     }
     $group->setSortOrder($data['sortOrder']);
     foreach ($this->getAttributes($data) as $attribute) {
         $group->addAttribute($attribute);
     }
     return $group;
 }
 /**
  * {@inheritDoc}
  */
 public function getTranslation($locale = NULL)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTranslation', array($locale));
     return parent::getTranslation($locale);
 }