/**
  * @param  Attribute            $attribute
  * @return array|mixed
  * @throws InvalidItemException
  */
 public function process($attribute)
 {
     $result = ['code' => $attribute->getCode(), 'labels' => array(), 'options' => array()];
     foreach ($attribute->getTranslations() as $trans) {
         $result['labels'][$trans->getLocale()] = $trans->getLabel();
     }
     foreach ($attribute->getOptions() as $attributeOption) {
         $result['options'][$attributeOption->getCode()] = $this->normalizeOption($attributeOption, $this->globalContext);
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function getTranslations()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTranslations', array());
     return parent::getTranslations();
 }