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