<commit_before><?php

/*
 * This file is part of the Harvest Cloud package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace HarvestCloud\MarketPlace\SellerBundle\Controller;

use HarvestCloud\MarketPlace\SellerBundle\Controller\SellerController as Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use HarvestCloud\CoreBundle\Entity\WindowMaker;
use HarvestCloud\CoreBundle\Form\WindowMakerType;

/**
 * WindowMakerController
 *
 * @author <NAME> <<EMAIL>>
 * @since 2012-10-09
 */
class WindowMakerController extends Controller
{
    /**
     * index
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-10
     */
    public function indexAction()
    {
        $currentProfile = $this->getCurrentProfile();

        $windowMakers = $this->getRepo('WindowMaker')
            ->findForSeller($currentProfile)
        ;

        return $this->render('HarvestCloudMarketPlaceSellerBundle:WindowMaker:index.html.twig', array(
          'windowMakers' => $windowMakers,
        ));
    }

    /**
     * show
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-09
     *
     * @Route("/window-maker/{id}")
     * @ParamConverter("windowMaker", class="HarvestCloudCoreBundle:WindowMaker")
     *
     * @param  WindowMaker  $windowMaker
     */
    public function showAction($windowMaker)
    {
        return $this->render('HarvestCloudMarketPlaceSellerBundle:WindowMaker:show.html.twig', array(
          'windowMaker' => $windowMaker,
        ));
    }

    /**
     * new
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-09
     *
     * @param  Request $request
     */
    public function newAction(Request $request)
    {
        $windowMaker = new WindowMaker();
        $form = $this->createForm(new WindowMakerType(), $windowMaker);

        if ($request->getMethod() == 'POST')<commit_msg>Passing Seller to WindowMakerType to get relevant Hubs<commit_after><?php

/*
 * This file is part of the Harvest Cloud package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace HarvestCloud\MarketPlace\SellerBundle\Controller;

use HarvestCloud\MarketPlace\SellerBundle\Controller\SellerController as Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use HarvestCloud\CoreBundle\Entity\WindowMaker;
use HarvestCloud\CoreBundle\Form\WindowMakerType;

/**
 * WindowMakerController
 *
 * @author <NAME> <<EMAIL>>
 * @since 2012-10-09
 */
class WindowMakerController extends Controller
{
    /**
     * index
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-10
     */
    public function indexAction()
    {
        $currentProfile = $this->getCurrentProfile();

        $windowMakers = $this->getRepo('WindowMaker')
            ->findForSeller($currentProfile)
        ;

        return $this->render('HarvestCloudMarketPlaceSellerBundle:WindowMaker:index.html.twig', array(
          'windowMakers' => $windowMakers,
        ));
    }

    /**
     * show
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-09
     *
     * @Route("/window-maker/{id}")
     * @ParamConverter("windowMaker", class="HarvestCloudCoreBundle:WindowMaker")
     *
     * @param  WindowMaker  $windowMaker
     */
    public function showAction($windowMaker)
    {
        return $this->render('HarvestCloudMarketPlaceSellerBundle:WindowMaker:show.html.twig', array(
          'windowMaker' => $windowMaker,
        ));
    }

    /**
     * new
     *
     * @author <NAME> <<EMAIL>>
     * @since  2012-10-09
     *
     * @param  Request $request
     */
    public function newAction(Request $request)
    {
        $windowMaker = new WindowMaker();
        $form = $this->createForm(new WindowMakerType($this->getCurrentProfile()), $windowMaker);

        if ($request->getMethod() == 'POST')
{'fraction_non_alphanumeric': 0.12562574493444578, 'fraction_numerical': 0.015256257449344458, 'mean_word_length': 3.015311004784689, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 46, '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': '3307261', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1251, 'n_words': 240}