Exemple #1
0
 static function getFriendlyItemTitle($title)
 {
     $friendly = $title;
     /*
     preg_match('/(.*?) \((.*)\)/', $title, $matches);
     $name = $matches[1];
     $options = array();
     if (isset($matches[2])) {
         $options = explode(', ', $matches[2]);
     }
     */
     $options = array();
     $last = Helper_String::getLastParenth($title);
     $name = $last['lead'];
     if ($last['last']) {
         $options = explode(', ', $last['last']);
     }
     if (count($options) > 2) {
         $optionStr = implode(', <br />', $options);
         $friendly = "{$name}(<br />" . $optionStr . "<br />)";
     }
     return $friendly;
 }