function getData($objectType, $objectId, Search_Type_Factory_Interface $typeFactory, array $data = array()) { $title = empty($data['title']) ? null : $data['title']->getValue(); $title = empty($title) ? '0' : $title; $substr = $this->substr; $strtoupper = $this->strtoupper; $first = $substr($title, 0, 1); $first = TikiLib::take_away_accent($first); $letter = $strtoupper($first); return array('title_initial' => $typeFactory->identifier($letter)); }
/** * Remove all "non-word" characters and accents from a string * Can be used for DOM elements and preferences etc * * @static * @param string $str * @return string cleaned */ static function remove_non_word_characters_and_accents($str) { return preg_replace('/\\W+/', '_', TikiLib::take_away_accent($str)); }
static function cmpcatname($a, $b) { $a = TikiLib::strtoupper(TikiLib::take_away_accent($a)); $b = TikiLib::strtoupper(TikiLib::take_away_accent($b)); return strcmp($a, $b); }