src/PHPDish/Bundle/UserBundle/Twig/UserExtension.php
public function getPointHistoryLabel(PointHistoryInterface $history)
    {
        static $labels = [
            PointHistory::TYPE_SIGN_IN => 'point.history.type.sign_in',
            PointHistory::TYPE_CHECK_IN => 'point.history.type.check_in',

            //资源
            PointHistory::TYPE_POST_TOPIC => 'point.history.type.post_topic',
            PointHistory::TYPE_POST_ARTICLE => 'point.history.type.post_article',
            // 资源被删除
            PointHistory::TYPE_REMOVE_TOPIC => 'point.history.type.remove_topic',
            PointHistory::TYPE_REMOVE_POST => 'point.history.type.remove_post',

            PointHistory::TYPE_POST_TOPIC_REPLY => 'point.history.type.post_topic_reply', //回复主题
            PointHistory::TYPE_TOPIC_REPLY => 'point.history.type.topic_reply', //主题被回复，

            PointHistory::TYPE_TOPIC_VOTED => 'point.history.type.topic_voted',
            PointHistory::TYPE_REPLY_VOTED => 'point.history.type.reply_voted',
            PointHistory::TYPE_AWARD => 'point.history.type.award',
        ];

        return $labels[$history->getType()] ?? 'point.history.type.unknown';
    }
public function getPointHistoryLabel(PointHistoryInterface $history)
    {
        static $labels = [
            PointHistory::TYPE_SIGN_IN => 'point.history.type.sign_in',
            PointHistory::TYPE_CHECK_IN => 'point.history.type.check_in',

            //资源
            PointHistory::TYPE_POST_TOPIC => 'point.history.type.post_topic',
            PointHistory::TYPE_POST_ARTICLE => 'point.history.type.post_article',
            // 资源被删除
            PointHistory::TYPE_REMOVE_TOPIC => 'point.history.type.remove_topic',
            PointHistory::TYPE_REMOVE_POST => 'point.history.type.remove_post',

            PointHistory::TYPE_POST_TOPIC_REPLY => 'point.history.type.post_topic_reply', //回复主题
            PointHistory::TYPE_TOPIC_REPLY => 'point.history.type.topic_reply', //主题被回复，

            PointHistory::TYPE_TOPIC_VOTED => 'point.history.type.topic_voted',
            PointHistory::TYPE_REPLY_VOTED => 'point.history.type.reply_voted',
            PointHistory::TYPE_AWARD => 'point.history.type.award',
        ];

        return $labels[$history->getType()] ?? 'point.history.type.unknown';
    }
获取积分历史类型

@param PointHistoryInterface $history
@return string