示例#1
0
 public function formatProgramName()
 {
     //is default program title within allowed length?
     if (StringUtility::isStringLengthLessThanMaxAllowed($this->CustomProgramName, $this->chars_allowed)) {
         return;
     }
     //no? let's apply marketing (short) program title
     if (!empty($this->CustomProgramNameShort)) {
         $this->CustomProgramName = $this->CustomProgramNameShort;
     }
     //we applied marketing program title (above) - is the program title now within allowed length?
     if (StringUtility::isStringLengthLessThanMaxAllowed($this->CustomProgramName, $this->chars_allowed)) {
         return;
     }
     //no? we'll have to forcibly shrink it
     $this->CustomProgramName = StringUtility::shrinkString($this->CustomProgramName, $this->chars_allowed);
 }