<commit_before><?php
class Kwc_Favourites_Page_Component extends Kwc_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['componentName'] = trlStatic('Favourites');
        $ret['viewCache'] = false;
        $ret['flags']['skipFulltextRecursive'] = true;
        $ret['flags']['hasComponentLinkModifiers'] = true;
        return $ret;
    }

    public function getComponentLinkModifiers()
    {
        return array(
            array(
                'type' => 'callback',
                'callback' => array('Kwc_Favourites_Page_Component', 'modifyComponentLink')
            )
        );
    }

    public static function modifyComponentLink($ret, $componentId)
    {
        return $ret .
            '<div class="cnt">' .
            count(Kwc_Favourites_Component::getFavouriteComponentIds()) .
            '</div>';
    }

    public function getTemplateVars()
    {<commit_msg>Change callback of favourites-page-component to be dynamic<commit_after><?php
class Kwc_Favourites_Page_Component extends Kwc_Abstract
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['componentName'] = trlStatic('Favourites');
        $ret['viewCache'] = false;
        $ret['flags']['skipFulltextRecursive'] = true;
        $ret['flags']['hasComponentLinkModifiers'] = true;
        return $ret;
    }

    public function getComponentLinkModifiers()
    {
        return array(
            array(
                'type' => 'callback',
                'callback' => array(get_class($this), 'modifyComponentLink')
            )
        );
    }

    public static function modifyComponentLink($ret, $componentId)
    {
        return $ret .
            '<div class="cnt">' .
            count(Kwc_Favourites_Component::getFavouriteComponentIds()) .
            '</div>';
    }

    public function getTemplateVars()
    {
{'fraction_non_alphanumeric': 0.12578288100208768, 'fraction_numerical': 0.0, 'mean_word_length': 2.369068541300527, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4647842', 'n_tokens_mistral': 542, 'n_tokens_neox': 530, 'n_words': 98}