/** * Return label * * If no label is present, returns the currently set name. * * If a translator is present, returns the translated label. * * @return string */ public function getLabel() { $value = parent::getLabel(); if (null === $value) { $value = $this->getName(); } if (null !== ($translator = $this->getTranslator())) { return $translator->translate($value); } return $value; }
public function getLabel() { return parent::getLabel() . $this->getTranslator()->translate($this->hash->getType()); }