Beispiel #1
0
 /**
  * @return array
  */
 private function _getEmoticonAdditionalCodesMapping()
 {
     $paging = new CM_Paging_Emoticon_All();
     $emoticonList = $paging->getItems();
     $filteredEmoticonList = \Functional\filter($emoticonList, function (CM_Emoticon $emoticon) {
         return count($emoticon->getCodes()) > 1;
     });
     $mapping = [];
     /** @var CM_Emoticon $emoticon */
     foreach ($filteredEmoticonList as $emoticon) {
         $codeList = $emoticon->getCodes();
         $defaultCode = $emoticon->getDefaultCode();
         foreach ($codeList as $code) {
             if ($code !== $defaultCode) {
                 $mapping[$code] = $defaultCode;
             }
         }
     }
     return $mapping;
 }