예제 #1
0
 /**
  * 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;
 }
예제 #2
0
파일: FileHash.php 프로젝트: alexukua/opus4
 public function getLabel()
 {
     return parent::getLabel() . $this->getTranslator()->translate($this->hash->getType());
 }