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
filter: | |
paths: | |
- 'src/*' | |
excluded_paths: | |
- 'src/Sylius/Bundle/*/spec/*' | |
- 'src/Sylius/Bundle/*/Tests/*' | |
- 'src/Sylius/Component/*/spec/*' | |
- 'src/Sylius/Component/*/Tests/*' | |
- 'app/*' | |
tools: |
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
Feature: Custom text printing | |
In order to sell more customized products | |
As a Customer | |
I want to customize my product | |
Background: | |
Given there is default currency configured | |
Scenario: Entering custom text when adding product to the cart | |
Given there is a product "Nike T-Shirt", which cost is 10 EUR |
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')); | |
} |
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
/** | |
* 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
<?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
<?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 | |
// 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 | |
namespace Sylius\Bundle\ThemingBundle\Packager; | |
use Symfony\Component\Config\Definition\Processor; | |
use Symfony\Component\Yaml\Yaml; | |
// ... | |
$processor = new Processor(); |
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. |
OlderNewer