/** * Returns the title of the current type, this is to form the title of the object. * * @param eZContentObjectAttribute $objectAttribute * @param string $name * * @return string */ public function title($objectAttribute, $name = null) { $content = $objectAttribute->content(); $classContent = $objectAttribute->classContent(); $titleArray = array(); $titleString = ""; if (count($content) > 0) { $options = $classContent['options']; if (isset($classContent['db_options']) && count($classContent['db_options']) > 0) { $options = $classContent['db_options']; } foreach ($options as $option) { if (in_array($option['identifier'], $content)) { $titleArray[] = $option['name']; } } unset($options); } if (count($titleArray) > 0) { $delimiter = $classContent['delimiter']; if (empty($delimiter)) { $delimiter = ", "; } $titleString = join($delimiter, $titleArray); } return $titleString; }