<commit_before><?php
namespace Cerad\Bundle\GameBundle\Action\Project\Results\Playoffs\Show;

use Cerad\Bundle\CoreBundle\Action\ActionView;

use Symfony\Component\HttpFoundation\Request;

class ResultsPlayoffsShowView extends ActionView
{
    protected $projectPools;
    
    public function __construct($projectPools)
    {
        $this->projectPools = $projectPools;
    }
    public function renderResponse(Request $request)
    {
        $model = $request->attributes->get('model');

        $_project = $request->attributes->get('_project');
        
        $projectPools = $this->projectPools;
        
        $routes = array();
        
        foreach($projectPools as $program => $genders)
        {
            foreach($genders as $gender => $ages)
            {
                foreach($ages as $age => $pools)
                {           
                    $levelKey = $model->genLevelKey($program,$gender,$age);
                    
                    $routes[$program][$gender][$age] = $this->generateUrl(
                        'cerad_game__project__results_playoffs__show',
                        array('_project' => $_project, 'level' => $levelKey,
                    ));
                    if ($pools);
                }
            }
        }
        // Allow control over what sections should be displayed
        if ($model->show == 'standings')
        {
            $shows = array('select' => false, 'help' => false, 'games' => true);
        }
        else
        {
            $shows = array('select' => true,  'help' => true,  'games' => true);
        }
        $games = $model->loadGames('QF,SF,FM');

        // And render
        $tplData = array();
        $tplData['shows']  = $shows;
        $tplData['games']  = $games;
        $tplData['routes'] = $routes;
        return $this->regularResponse($request->attributes->get('_template'),$tplData);
    }
}<commit_msg>Setting Pool Play Results cache to 6 seconds.<commit_after><?php
namespace Cerad\Bundle\GameBundle\Action\Project\Results\Playoffs\Show;

use Cerad\Bundle\CoreBundle\Action\ActionView;

use Symfony\Component\HttpFoundation\Request;

class ResultsPlayoffsShowView extends ActionView
{
    protected $projectPools;
    
    public function __construct($projectPools)
    {
        $this->projectPools = $projectPools;
    }
    public function renderResponse(Request $request)
    {
        $model = $request->attributes->get('model');

        $_project = $request->attributes->get('_project');
        
        $projectPools = $this->projectPools;
        
        $routes = array();
        
        foreach($projectPools as $program => $genders)
        {
            foreach($genders as $gender => $ages)
            {
                foreach($ages as $age => $pools)
                {           
                    $levelKey = $model->genLevelKey($program,$gender,$age);
                    
                    $routes[$program][$gender][$age] = $this->generateUrl(
                        'cerad_game__project__results_playoffs__show',
                        array('_project' => $_project, 'level' => $levelKey,
                    ));
                    if ($pools);
                }
            }
        }
        // Allow control over what sections should be displayed
        if ($model->show == 'standings')
        {
            $shows = array('select' => false, 'help' => false, 'games' => true);
        }
        else
        {
            $shows = array('select' => true,  'help' => true,  'games' => true);
        }
        $games = $model->loadGames('QF,SF,FM');

        // And render
        $tplData = array();
        $tplData['shows']  = $shows;
        $tplData['games']  = $games;
        $tplData['routes'] = $routes;
        
        
        $response =  $this->regularResponse($request->attributes->get('_template'),$tplData);
        $response->setPublic();
        $response->setMaxAge(6);
    }
}
{'fraction_non_alphanumeric': 0.13959969597162403, 'fraction_numerical': 0.0005067139599695972, 'mean_word_length': 1.7980155917788803, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '1094338', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1090, 'n_words': 195}