示例#1
0
文件: Submit.php 项目: jasmun/Noco100
 /**
  * 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;
 }