This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the Sylius package. | |
* | |
* (c) Paweł Jędrzejewski | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Super cool theme by super cool theme designer. | |
# (c) Super cool theme designer | |
theme: | |
name: "Super cool theme." | |
version: 0.1.2 | |
description: | | |
The coolest theme evar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Application/Bundle/UserBundle. | |
namespace Application\Bundle\UserBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class ApplicationUserBundle extends Bundle | |
{ | |
public function getParent() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
return $this->container->get('templating')->renderResponse('FOSUserBundle:Registration:register.html.'.$this->getEngine(), array( | |
'form' => $form->createView(), | |
'theme' => $this->container->getParameter('fos_user.template.theme'), | |
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the Sylius package. | |
* | |
* (c) Paweł Jędrzejewski | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Products. | |
* | |
* @OneToMany(targetEntity="Sylius\AssortmentBundle\Entity\Product", mappedBy="category") | |
*/ | |
protected $products; | |
/* ... */ | |
public function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<container xmlns="http://www.symfony-project.org/schema/dic/services" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd"> | |
<parameters> | |
<parameter key="sylius.assortment.form.category.class">Sylius\AssortmentBundle\Form\CategoryForm</parameter> | |
<parameter key="sylius.assortment.form.category.name">form.category</parameter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form = $this->get('sylius.assortment.form.category'); | |
$category = $this->get('sylius.assortment.manager')->createCategory(); | |
$form->bind($this->get('request'), $category); | |
if ($form->isValid()) { | |
$this->get('sylius.assortment.manager')->addCategory($category); | |
return new RedirectResponse($this->get('router')->generate('homepage')); | |
} |
NewerOlder