mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge pull request #6717 from pamil/remove-content-bundle
Remove ContentBundle
This commit is contained in:
commit
550aece122
156 changed files with 278 additions and 4855 deletions
|
|
@ -13,13 +13,6 @@ doctrine:
|
|||
host: localhost
|
||||
port: 11211
|
||||
|
||||
doctrine_phpcr:
|
||||
odm:
|
||||
metadata_cache_driver:
|
||||
type: memcached
|
||||
host: localhost
|
||||
port: 11211
|
||||
|
||||
twig:
|
||||
strict_variables: true
|
||||
|
||||
|
|
|
|||
52
app/migrations/Version20161114154818.php
Normal file
52
app/migrations/Version20161114154818.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace Sylius\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
class Version20161114154818 extends AbstractMigration
|
||||
{
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('DROP TABLE phpcr_binarydata');
|
||||
$this->addSql('DROP TABLE phpcr_internal_index_types');
|
||||
$this->addSql('DROP TABLE phpcr_namespaces');
|
||||
$this->addSql('DROP TABLE phpcr_nodes');
|
||||
$this->addSql('DROP TABLE phpcr_nodes_references');
|
||||
$this->addSql('DROP TABLE phpcr_nodes_weakreferences');
|
||||
$this->addSql('DROP TABLE phpcr_type_childs');
|
||||
$this->addSql('DROP TABLE phpcr_type_nodes');
|
||||
$this->addSql('DROP TABLE phpcr_type_props');
|
||||
$this->addSql('DROP TABLE phpcr_workspaces');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Schema $schema
|
||||
*/
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
|
||||
|
||||
$this->addSql('CREATE TABLE phpcr_binarydata (id INT AUTO_INCREMENT NOT NULL, node_id INT NOT NULL, property_name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, workspace_name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, idx INT DEFAULT 0 NOT NULL, data LONGBLOB NOT NULL, UNIQUE INDEX UNIQ_37E65615460D9FD7413BC13C1AC10DC4E7087E10 (node_id, property_name, workspace_name, idx), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_internal_index_types (type VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, node_id INT NOT NULL, PRIMARY KEY(type, node_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_namespaces (prefix VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, uri VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, PRIMARY KEY(prefix)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_nodes (id INT AUTO_INCREMENT NOT NULL, path VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, parent VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, local_name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, namespace VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, workspace_name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, identifier VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, type VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, props LONGTEXT NOT NULL COLLATE utf8_unicode_ci, numerical_props LONGTEXT DEFAULT NULL COLLATE utf8_unicode_ci, depth INT NOT NULL, sort_order INT DEFAULT NULL, UNIQUE INDEX UNIQ_A4624AD7B548B0F1AC10DC4 (path, workspace_name), UNIQUE INDEX UNIQ_A4624AD7772E836A1AC10DC4 (identifier, workspace_name), INDEX IDX_A4624AD73D8E604F (parent), INDEX IDX_A4624AD78CDE5729 (type), INDEX IDX_A4624AD7623C14D533E16B56 (local_name, namespace), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_nodes_references (source_id INT NOT NULL, source_property_name VARCHAR(220) NOT NULL COLLATE utf8_unicode_ci, target_id INT NOT NULL, INDEX IDX_F3BF7E1158E0B66 (target_id), PRIMARY KEY(source_id, source_property_name, target_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_nodes_weakreferences (source_id INT NOT NULL, source_property_name VARCHAR(220) NOT NULL COLLATE utf8_unicode_ci, target_id INT NOT NULL, INDEX IDX_F0E4F6FA158E0B66 (target_id), PRIMARY KEY(source_id, source_property_name, target_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_type_childs (node_type_id INT NOT NULL, name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, protected TINYINT(1) NOT NULL, auto_created TINYINT(1) NOT NULL, mandatory TINYINT(1) NOT NULL, on_parent_version INT NOT NULL, primary_types VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, default_type VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_type_nodes (node_type_id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, supertypes VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, is_abstract TINYINT(1) NOT NULL, is_mixin TINYINT(1) NOT NULL, queryable TINYINT(1) NOT NULL, orderable_child_nodes TINYINT(1) NOT NULL, primary_item VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci, UNIQUE INDEX UNIQ_34B0A8095E237E06 (name), PRIMARY KEY(node_type_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_type_props (node_type_id INT NOT NULL, name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, protected TINYINT(1) NOT NULL, auto_created TINYINT(1) NOT NULL, mandatory TINYINT(1) NOT NULL, on_parent_version INT NOT NULL, multiple TINYINT(1) NOT NULL, fulltext_searchable TINYINT(1) NOT NULL, query_orderable TINYINT(1) NOT NULL, required_type INT NOT NULL, query_operators INT NOT NULL, default_value VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci, PRIMARY KEY(node_type_id, name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE phpcr_workspaces (name VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
|
||||
}
|
||||
}
|
||||
|
|
@ -31,13 +31,11 @@
|
|||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||
"doctrine/doctrine-migrations-bundle": "~1.0",
|
||||
"doctrine/orm": "^2.4.8,<2.5",
|
||||
"doctrine/phpcr-odm": "^1.3",
|
||||
"friendsofsymfony/oauth-server-bundle": "~1.4",
|
||||
"friendsofsymfony/rest-bundle": "~1.5",
|
||||
"fzaninotto/faker": "~1.2",
|
||||
"gedmo/doctrine-extensions": "^2.4.12",
|
||||
"incenteev/composer-parameter-handler": "~2.0",
|
||||
"jackalope/jackalope-doctrine-dbal": "^1.1.2",
|
||||
"jms/serializer-bundle": "^0.13|^1.0",
|
||||
"knplabs/knp-gaufrette-bundle": "~0.1",
|
||||
"knplabs/knp-menu-bundle": "^2.1",
|
||||
|
|
@ -51,8 +49,6 @@
|
|||
"sonata-project/intl-bundle": "^2.2",
|
||||
"stof/doctrine-extensions-bundle": "~1.1",
|
||||
"swiftmailer/swiftmailer": "~5.0",
|
||||
"symfony-cmf/content-bundle": "^1.3",
|
||||
"symfony-cmf/routing-bundle": "^1.4",
|
||||
"symfony/monolog-bundle": "^2.8",
|
||||
"symfony/polyfill-iconv": "~1.0",
|
||||
"symfony/polyfill-intl-icu": "~1.0",
|
||||
|
|
@ -102,7 +98,6 @@
|
|||
"sylius/api-bundle": "self.version",
|
||||
"sylius/attribute": "self.version",
|
||||
"sylius/attribute-bundle": "self.version",
|
||||
"sylius/content-bundle": "self.version",
|
||||
"sylius/core": "self.version",
|
||||
"sylius/core-bundle": "self.version",
|
||||
"sylius/currency": "self.version",
|
||||
|
|
|
|||
1172
composer.lock
generated
1172
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,6 @@ print_header "Setting the application up" "Sylius"
|
|||
run_command "app/console doctrine:database:create --env=test_cached -vvv" || exit $? # Have to be run with debug = true, to omit generating proxies before setting up the database
|
||||
run_command "app/console cache:warmup --env=test_cached --no-debug -vvv" || exit $?
|
||||
run_command "app/console doctrine:migrations:migrate --no-interaction --env=test_cached --no-debug -vvv" || exit $?
|
||||
run_command "app/console doctrine:phpcr:repository:init --env=test_cached --no-debug -vvv" || exit $?
|
||||
|
||||
print_header "Setting the web assets up" "sylius"
|
||||
run_command "app/console assets:install --env=test_cached --no-debug -vvv" || exit $?
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
@managing_routes
|
||||
Feature: Adding a new route
|
||||
In order to make my content available for customers
|
||||
As an Administrator
|
||||
I want to add route to my site
|
||||
|
||||
Background:
|
||||
Given the store has static content "Krzysztof Krawczyk"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Adding a route
|
||||
Given I want to add a new route
|
||||
When I set its name to "krzysztof-krawczyk"
|
||||
And I choose "Krzysztof Krawczyk" as its content
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the route "krzysztof-krawczyk" should appear in the store
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@managing_routes
|
||||
Feature: Browsing routes
|
||||
In order to see all routes in the store
|
||||
As an Administrator
|
||||
I want to browse routes
|
||||
|
||||
Background:
|
||||
Given the store has static content "Krzysztof Krawczyk"
|
||||
And the store has routes "krzysztof-krawczyk" and "the-best-musician"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Browsing routes in store
|
||||
When I want to browse routes of the store
|
||||
Then I should see 2 routes in the list
|
||||
And I should see the route "krzysztof-krawczyk" in the list
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@managing_routes
|
||||
Feature: Deleting a route
|
||||
In order to remove test, obsolete or incorrect routes
|
||||
As an Administrator
|
||||
I want to be able to delete a route
|
||||
|
||||
Background:
|
||||
Given the store has static content "Krzysztof Krawczyk"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Deleted taxon should disappear from the registry
|
||||
Given the store has route "krzysztof-krawczyk"
|
||||
When I delete route "krzysztof-krawczyk"
|
||||
Then I should be notified that it has been successfully deleted
|
||||
And the route "krzysztof-krawczyk" should no longer exist in the store
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
@managing_routes
|
||||
Feature: Editing a route
|
||||
In order to change route
|
||||
As an Administrator
|
||||
I want to be able to edit a route
|
||||
|
||||
Background:
|
||||
Given the store has static contents "Krzysztof Krawczyk" and "Ryszard Rynkowski"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Change title of a route
|
||||
Given the store has route "krzysztof-krawczyk" with "Ryszard Rynkowski" as its content
|
||||
And I want to edit this route
|
||||
When I choose "Krzysztof Krawczyk" as its new content
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this route should have assigned "Krzysztof Krawczyk" content
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
@managing_routes
|
||||
Feature: Routes validation
|
||||
In order to avoid making mistakes when managing a route
|
||||
As an Administrator
|
||||
I want to be prevented from adding it without specifying required fields
|
||||
|
||||
Background:
|
||||
Given the store has static content "Krzysztof Krawczyk"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Trying to add a new route without specifying its name
|
||||
Given I want to add a new route
|
||||
When I choose "Krzysztof Krawczyk" as its content
|
||||
And I add it
|
||||
Then I should be notified that name is required
|
||||
And the route with content "Krzysztof Krawczyk" should not be added
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
@managing_static_contents
|
||||
Feature: Adding a new static content
|
||||
In order to manage content
|
||||
As an Administrator
|
||||
I want to add static content to my site
|
||||
|
||||
Background:
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Adding static content
|
||||
Given I want to add a new static content
|
||||
When I set its title to "Krzysztof Krawczyk"
|
||||
And I set its name to "krzysztof-krawczyk"
|
||||
And I set its body to "Biography of the great Polish singer"
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the static content "Krzysztof Krawczyk" should appear in the store
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
@managing_static_contents
|
||||
Feature: Browsing static contents
|
||||
In order to see all static contents in the store
|
||||
As an Administrator
|
||||
I want to browse static contents
|
||||
|
||||
Background:
|
||||
Given the store has static contents "Krzysztof Krawczyk" and "Ryszard Rynkowski"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Browsing static contents in store
|
||||
When I want to browse static contents of the store
|
||||
Then I should see 2 static contents in the list
|
||||
And I should see the static content "Krzysztof Krawczyk" in the list
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
@managing_static_contents
|
||||
Feature: Deleting a static content
|
||||
In order to remove test, obsolete or incorrect static contents
|
||||
As an Administrator
|
||||
I want to be able to delete a static content
|
||||
|
||||
Background:
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Deleted taxon should disappear from the registry
|
||||
Given the store has static content "Krzysztof Krawczyk"
|
||||
When I delete static content "Krzysztof Krawczyk"
|
||||
Then I should be notified that it has been successfully deleted
|
||||
And the static content "Krzysztof Krawczyk" should no longer exist in the store
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
@managing_static_contents
|
||||
Feature: Editing a static content
|
||||
In order to change static content
|
||||
As an Administrator
|
||||
I want to be able to edit a static content
|
||||
|
||||
Background:
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Change title of a static content
|
||||
Given the store has static content "Krzysztof Krawczyk" with body "Not so good singer."
|
||||
And I want to edit this static content
|
||||
When I change its body to "The best singer all over the world!"
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this static content should have body "The best singer all over the world!"
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
@managing_static_contents
|
||||
Feature: Static contents validation
|
||||
In order to avoid making mistakes when managing a static content
|
||||
As an Administrator
|
||||
I want to be prevented from adding it without specifying required fields
|
||||
|
||||
Background:
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Trying to add a new static content without specifying its body
|
||||
Given I want to add a new static content
|
||||
When I set its title to "Krzysztof Krawczyk"
|
||||
And I set its name to "krzysztof-krawczyk"
|
||||
And I add it
|
||||
Then I should be notified that body is required
|
||||
And the static content "Krzysztof Krawczyk" should not be added
|
||||
|
||||
@ui
|
||||
Scenario: Trying to add a new static content without specifying its name
|
||||
Given I want to add a new static content
|
||||
When I set its title to "Krzysztof Krawczyk"
|
||||
And I set its body to "Biography of the great Polish singer"
|
||||
And I add it
|
||||
Then I should be notified that name is required
|
||||
And the static content "Krzysztof Krawczyk" should not be added
|
||||
|
||||
@ui
|
||||
Scenario: Trying to add a new static content without specifying its title
|
||||
Given I want to add a new static content
|
||||
When I set its name to "krzysztof-krawczyk"
|
||||
And I set its body to "Biography of the great Polish singer"
|
||||
And I add it
|
||||
Then I should be notified that title is required
|
||||
And the static content "Krzysztof Krawczyk" should not be added
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
@static_content
|
||||
Feature: Showing static content
|
||||
In order to access information about the shop
|
||||
As a Customer
|
||||
I want to be able to browse through its pages
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
|
||||
@ui
|
||||
Scenario: Showing static content
|
||||
Given the store has static content "Krzysztof Krawczyk" with name "krzysztof-krawczyk"
|
||||
When I access static content with name "krzysztof-krawczyk"
|
||||
Then I should see that static content
|
||||
|
||||
@ui
|
||||
Scenario: Preventing from showing unpublished static content
|
||||
Given the store has static content "Krzysztof Krawczyk" with name "krzysztof-krawczyk"
|
||||
And it is not published yet
|
||||
When I access static content with name "krzysztof-krawczyk"
|
||||
Then that static content should not be found there
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Context\Setup;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
|
||||
use Sylius\Behat\Service\SharedStorageInterface;
|
||||
use Sylius\Component\Resource\Repository\RepositoryInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class RouteContext implements Context
|
||||
{
|
||||
/**
|
||||
* @var SharedStorageInterface
|
||||
*/
|
||||
private $sharedStorage;
|
||||
|
||||
/**
|
||||
* @var ExampleFactoryInterface
|
||||
*/
|
||||
private $routeExampleFactory;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $routeManager;
|
||||
|
||||
/**
|
||||
* @var RepositoryInterface
|
||||
*/
|
||||
private $staticContentRepository;
|
||||
|
||||
/**
|
||||
* @param SharedStorageInterface $sharedStorage
|
||||
* @param ExampleFactoryInterface $routeExampleFactory
|
||||
* @param ObjectManager $routeManager
|
||||
* @param RepositoryInterface $staticContentRepository
|
||||
*/
|
||||
public function __construct(
|
||||
SharedStorageInterface $sharedStorage,
|
||||
ExampleFactoryInterface $routeExampleFactory,
|
||||
ObjectManager $routeManager,
|
||||
RepositoryInterface $staticContentRepository
|
||||
) {
|
||||
$this->sharedStorage = $sharedStorage;
|
||||
$this->routeExampleFactory = $routeExampleFactory;
|
||||
$this->routeManager = $routeManager;
|
||||
$this->staticContentRepository = $staticContentRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has route :name
|
||||
*/
|
||||
public function theStoreHasRoute($name)
|
||||
{
|
||||
$route = $this->routeExampleFactory->create(['name' => $name]);
|
||||
|
||||
$this->routeManager->persist($route);
|
||||
$this->routeManager->flush();
|
||||
|
||||
$this->sharedStorage->set('route', $route);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has routes :firstName and :secondName
|
||||
*/
|
||||
public function theStoreHasRoutes(...$routesNames)
|
||||
{
|
||||
foreach ($routesNames as $routesName) {
|
||||
$this->theStoreHasRoute($routesName);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has route :name with :contentTitle as its content
|
||||
*/
|
||||
public function theStoreHasRouteWithAsItsContent($name, $contentTitle)
|
||||
{
|
||||
$content = $this->staticContentRepository->findOneBy(['title' => $contentTitle]);
|
||||
|
||||
$route = $this->routeExampleFactory->create(['name' => $name, 'content' => $content]);
|
||||
|
||||
$this->routeManager->persist($route);
|
||||
$this->routeManager->flush();
|
||||
|
||||
$this->sharedStorage->set('route', $route);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Context\Setup;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
|
||||
use Sylius\Behat\Service\SharedStorageInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class StaticContentContext implements Context
|
||||
{
|
||||
/**
|
||||
* @var SharedStorageInterface
|
||||
*/
|
||||
private $sharedStorage;
|
||||
|
||||
/**
|
||||
* @var ExampleFactoryInterface
|
||||
*/
|
||||
private $staticContentExampleFactory;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $staticContentManager;
|
||||
|
||||
/**
|
||||
* @param SharedStorageInterface $sharedStorage
|
||||
* @param ExampleFactoryInterface $staticContentExampleFactory
|
||||
* @param ObjectManager $staticContentManager
|
||||
*/
|
||||
public function __construct(
|
||||
SharedStorageInterface $sharedStorage,
|
||||
ExampleFactoryInterface $staticContentExampleFactory,
|
||||
ObjectManager $staticContentManager
|
||||
) {
|
||||
$this->sharedStorage = $sharedStorage;
|
||||
$this->staticContentExampleFactory = $staticContentExampleFactory;
|
||||
$this->staticContentManager = $staticContentManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has static content :title
|
||||
*/
|
||||
public function theStoreHasStaticContent($title)
|
||||
{
|
||||
$staticContent = $this->staticContentExampleFactory->create(['title' => $title]);
|
||||
|
||||
$this->staticContentManager->persist($staticContent);
|
||||
$this->staticContentManager->flush();
|
||||
|
||||
$this->sharedStorage->set('static_content', $staticContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has static contents :firstTitle and :secondTitle
|
||||
*/
|
||||
public function theStoreHasStaticContents(...$titles)
|
||||
{
|
||||
foreach ($titles as $title) {
|
||||
$this->theStoreHasStaticContent($title);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has static content :title with body :body
|
||||
*/
|
||||
public function theStoreHasStaticContentWithBody($title, $body)
|
||||
{
|
||||
$staticContent = $this->staticContentExampleFactory->create(['title' => $title, 'body' => $body]);
|
||||
|
||||
$this->staticContentManager->persist($staticContent);
|
||||
$this->staticContentManager->flush();
|
||||
|
||||
$this->sharedStorage->set('static_content', $staticContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the store has static content :title with name :name
|
||||
*/
|
||||
public function theStoreHasStaticContentWithName($title, $name)
|
||||
{
|
||||
$staticContent = $this->staticContentExampleFactory->create(['title' => $title, 'name' => $name]);
|
||||
|
||||
$this->staticContentManager->persist($staticContent);
|
||||
$this->staticContentManager->flush();
|
||||
|
||||
$this->sharedStorage->set('static_content', $staticContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^(it) is not published yet$/
|
||||
*/
|
||||
public function itIsNotPublishedYet(StaticContent $staticContent)
|
||||
{
|
||||
$staticContent->setPublishable(false);
|
||||
|
||||
$this->staticContentManager->flush();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,211 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Context\Ui\Admin;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Sylius\Behat\Page\Admin\Crud\IndexPageInterface;
|
||||
use Sylius\Behat\Page\Admin\Route\CreatePageInterface;
|
||||
use Sylius\Behat\Page\Admin\Route\UpdatePageInterface;
|
||||
use Sylius\Bundle\ContentBundle\Document\Route;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class ManagingRoutesContext implements Context
|
||||
{
|
||||
/**
|
||||
* @var IndexPageInterface
|
||||
*/
|
||||
private $indexPage;
|
||||
|
||||
/**
|
||||
* @var CreatePageInterface
|
||||
*/
|
||||
private $createPage;
|
||||
|
||||
/**
|
||||
* @var UpdatePageInterface
|
||||
*/
|
||||
private $updatePage;
|
||||
|
||||
/**
|
||||
* @param IndexPageInterface $indexPage
|
||||
* @param CreatePageInterface $createPage
|
||||
* @param UpdatePageInterface $updatePage
|
||||
*/
|
||||
public function __construct(
|
||||
IndexPageInterface $indexPage,
|
||||
CreatePageInterface $createPage,
|
||||
UpdatePageInterface $updatePage
|
||||
) {
|
||||
$this->indexPage = $indexPage;
|
||||
$this->createPage = $createPage;
|
||||
$this->updatePage = $updatePage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given I want to create a new route
|
||||
* @Given I want to add a new route
|
||||
*/
|
||||
public function iWantToCreateNewRoute()
|
||||
{
|
||||
$this->createPage->open();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I want to browse routes of the store
|
||||
*/
|
||||
public function iWantToBrowseRoutesOfTheStore()
|
||||
{
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I set its name to :name
|
||||
*/
|
||||
public function iSetItsNameTo($name)
|
||||
{
|
||||
$this->createPage->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I choose :title as its content
|
||||
*/
|
||||
public function iChooseContent($title)
|
||||
{
|
||||
$this->createPage->chooseContent($title);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I add it
|
||||
* @When I try to add it
|
||||
*/
|
||||
public function iAddIt()
|
||||
{
|
||||
$this->createPage->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the route :name should appear in the store
|
||||
* @Then I should see the route :name in the list
|
||||
*/
|
||||
public function theRouteShouldAppearInTheStore($name)
|
||||
{
|
||||
if (!$this->indexPage->isOpen()) {
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
Assert::true(
|
||||
$this->indexPage->isSingleResourceOnPage(['name' => $name]),
|
||||
sprintf('Could not find route with name "%s"!', $name)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should see :amount routes in the list
|
||||
*/
|
||||
public function iShouldSeeThatManyRoutesInTheList($amount)
|
||||
{
|
||||
Assert::same(
|
||||
(int) $amount,
|
||||
$this->indexPage->countItems(),
|
||||
'Amount of routes should be equal %s, but was %2$s.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I delete route :name
|
||||
*/
|
||||
public function iDeleteRoute($name)
|
||||
{
|
||||
$this->indexPage->open();
|
||||
$this->indexPage->deleteResourceOnPage(['name' => $name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given the route :name should no longer exist in the store
|
||||
*/
|
||||
public function theRouteShouldNoLongerExistInTheStore($name)
|
||||
{
|
||||
Assert::false(
|
||||
$this->indexPage->isSingleResourceOnPage(['name' => $name]),
|
||||
sprintf('Route with name "%s" exists, but should not.', $name)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^I want to edit (this route)$/
|
||||
*/
|
||||
public function iWantToEditThisRoute(Route $route)
|
||||
{
|
||||
$this->updatePage->open(['id' => $route->getId()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I choose :title as its new content
|
||||
*/
|
||||
public function iChooseNewContent($title)
|
||||
{
|
||||
$this->updatePage->chooseNewContent($title);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I save my changes
|
||||
* @When I try to save my changes
|
||||
*/
|
||||
public function iSaveMyChanges()
|
||||
{
|
||||
$this->updatePage->saveChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(this route) should have assigned "([^"]+)" content$/
|
||||
*/
|
||||
public function thisRouteShouldHaveAssignedContent(Route $route, $contentTitle)
|
||||
{
|
||||
if (!$this->indexPage->isOpen()) {
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
Assert::true(
|
||||
$this->indexPage->isSingleResourceOnPage(['name' => $route->getName(), 'content' => $contentTitle]),
|
||||
sprintf('Cannot find route with name "%s" and content "%s" assigned.', $route->getName(), $contentTitle)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should be notified that name is required
|
||||
*/
|
||||
public function iShouldBeNotifiedThatElementIsRequired()
|
||||
{
|
||||
Assert::same(
|
||||
$this->createPage->getValidationMessage('name'),
|
||||
'This value should not be blank.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the route with content :title should not be added
|
||||
*/
|
||||
public function theRouteWithContentShouldNotBeAdded($title)
|
||||
{
|
||||
if (!$this->indexPage->isOpen()) {
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
Assert::false(
|
||||
$this->indexPage->isSingleResourceOnPage(['content' => $title]),
|
||||
sprintf('Found route with content "%s" assigned, but expected not to.', $title)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Context\Ui\Admin;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Sylius\Behat\Page\Admin\Crud\IndexPageInterface;
|
||||
use Sylius\Behat\Page\Admin\StaticContent\CreatePageInterface;
|
||||
use Sylius\Behat\Page\Admin\StaticContent\UpdatePageInterface;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class ManagingStaticContentsContext implements Context
|
||||
{
|
||||
/**
|
||||
* @var IndexPageInterface
|
||||
*/
|
||||
private $indexPage;
|
||||
|
||||
/**
|
||||
* @var CreatePageInterface
|
||||
*/
|
||||
private $createPage;
|
||||
|
||||
/**
|
||||
* @var UpdatePageInterface
|
||||
*/
|
||||
private $updatePage;
|
||||
|
||||
/**
|
||||
* @param IndexPageInterface $indexPage
|
||||
* @param CreatePageInterface $createPage
|
||||
* @param UpdatePageInterface $updatePage
|
||||
*/
|
||||
public function __construct(
|
||||
IndexPageInterface $indexPage,
|
||||
CreatePageInterface $createPage,
|
||||
UpdatePageInterface $updatePage
|
||||
) {
|
||||
$this->indexPage = $indexPage;
|
||||
$this->createPage = $createPage;
|
||||
$this->updatePage = $updatePage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given I want to create a new static content
|
||||
* @Given I want to add a new static content
|
||||
*/
|
||||
public function iWantToCreateNewStaticContent()
|
||||
{
|
||||
$this->createPage->open();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I want to browse static contents of the store
|
||||
*/
|
||||
public function iWantToBrowseStaticContentsOfTheStore()
|
||||
{
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I set its title to :title
|
||||
*/
|
||||
public function iSetItsTitleTo($title)
|
||||
{
|
||||
$this->createPage->setTitle($title);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I set its name to :name
|
||||
*/
|
||||
public function iSetItsNameTo($name)
|
||||
{
|
||||
$this->createPage->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I set its body to :body
|
||||
*/
|
||||
public function iSetItsBodyTo($body)
|
||||
{
|
||||
$this->createPage->setBody($body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I add it
|
||||
* @When I try to add it
|
||||
*/
|
||||
public function iAddIt()
|
||||
{
|
||||
$this->createPage->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^I should be notified that (body|name|title) is required$/
|
||||
*/
|
||||
public function iShouldBeNotifiedThatElementIsRequired($element)
|
||||
{
|
||||
Assert::same(
|
||||
$this->createPage->getValidationMessage($element),
|
||||
'This value should not be blank.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the static content :title should appear in the store
|
||||
* @Then I should see the static content :title in the list
|
||||
*/
|
||||
public function theStaticContentShouldAppearInTheStore($title)
|
||||
{
|
||||
if (!$this->indexPage->isOpen()) {
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
Assert::true(
|
||||
$this->indexPage->isSingleResourceOnPage(['title' => $title]),
|
||||
sprintf('Could not find static content with title "%s"!', $title)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should see :amount static contents in the list
|
||||
*/
|
||||
public function iShouldSeeThatManyStaticContentsInTheList($amount)
|
||||
{
|
||||
Assert::same(
|
||||
(int) $amount,
|
||||
$this->indexPage->countItems(),
|
||||
'Amount of static contents should be equal %s, but was %2$s.'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the static content :title should not be added
|
||||
*/
|
||||
public function theStaticContentShouldNotBeAdded($title)
|
||||
{
|
||||
if (!$this->indexPage->isOpen()) {
|
||||
$this->indexPage->open();
|
||||
}
|
||||
|
||||
Assert::false(
|
||||
$this->indexPage->isSingleResourceOnPage(['title' => $title]),
|
||||
sprintf('Static content with title %s was created, but it should not.', $title)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Given /^I want to edit (this static content)$/
|
||||
*/
|
||||
public function iWantToEditThisStaticContent(StaticContent $staticContent)
|
||||
{
|
||||
$this->updatePage->open(['id' => $staticContent->getId()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I change its body to :body
|
||||
*/
|
||||
public function iChangeItsBodyTo($body)
|
||||
{
|
||||
$this->updatePage->changeBodyTo($body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I save my changes
|
||||
* @When I try to save my changes
|
||||
*/
|
||||
public function iSaveMyChanges()
|
||||
{
|
||||
$this->updatePage->saveChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I delete static content :title
|
||||
*/
|
||||
public function iDeleteStaticContent($title)
|
||||
{
|
||||
$this->indexPage->open();
|
||||
$this->indexPage->deleteResourceOnPage(['title' => $title]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(this static content) should have body "([^"]+)"$/
|
||||
*/
|
||||
public function thisStaticContentShouldHaveBody(StaticContent $staticContent, $body)
|
||||
{
|
||||
$this->updatePage->open(['id' => $staticContent->getId()]);
|
||||
|
||||
Assert::same($this->updatePage->getBody(), $body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the static content :title should no longer exist in the store
|
||||
*/
|
||||
public function theStaticContentShouldNoLongerExistInTheStore($title)
|
||||
{
|
||||
Assert::false(
|
||||
$this->indexPage->isSingleResourceOnPage(['title' => $title]),
|
||||
sprintf('Static content with title %s exists, but should not.', $title)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Context\Ui\Shop;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
use Sylius\Behat\Page\Shop\StaticContentPageInterface;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class StaticContentContext implements Context
|
||||
{
|
||||
/**
|
||||
* @var StaticContentPageInterface
|
||||
*/
|
||||
private $staticContentPage;
|
||||
|
||||
/**
|
||||
* @param StaticContentPageInterface $staticContentPage
|
||||
*/
|
||||
public function __construct(StaticContentPageInterface $staticContentPage)
|
||||
{
|
||||
$this->staticContentPage = $staticContentPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I access static content with name :name
|
||||
*/
|
||||
public function iAccessStaticContentWithName($name)
|
||||
{
|
||||
$this->staticContentPage->tryToOpen(['name' => $name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^I should see (that static content)$/
|
||||
*/
|
||||
public function iShouldSeeThatStaticContent(StaticContent $staticContent)
|
||||
{
|
||||
$this->staticContentPage->assertPageHasContent($staticContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(that static content) should not be found there$/
|
||||
*/
|
||||
public function thatPageShouldNotBeFound(StaticContent $staticContent)
|
||||
{
|
||||
try {
|
||||
$this->iShouldSeeThatStaticContent($staticContent);
|
||||
} catch (\Exception $exception) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new \Exception(sprintf('Static content "%s" was found but it should not!', $staticContent->getTitle()));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\Route;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
class CreatePage extends BaseCreatePage implements CreatePageInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->getSession()->getPage()->fillField('Name', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function chooseContent($title)
|
||||
{
|
||||
$this->getSession()->getPage()->selectFieldOption('Content', $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getDefinedElements()
|
||||
{
|
||||
return array_merge(parent::getDefinedElements(), [
|
||||
'content' => '#sylius_route_content',
|
||||
'name' => '#sylius_route_name',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\Route;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\CreatePageInterface as BaseCreatePageInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface CreatePageInterface extends BaseCreatePageInterface
|
||||
{
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function chooseContent($title);
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\Route;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
class UpdatePage extends BaseUpdatePage implements UpdatePageInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function chooseNewContent($title)
|
||||
{
|
||||
$this->getSession()->getPage()->selectFieldOption('Content', $title);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\Route;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface as BaseUpdatePageInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface UpdatePageInterface extends BaseUpdatePageInterface
|
||||
{
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function chooseNewContent($title);
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\StaticContent;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
class CreatePage extends BaseCreatePage implements CreatePageInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->getSession()->getPage()->fillField('Title', $title);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->getSession()->getPage()->fillField('Internal name', $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setBody($body)
|
||||
{
|
||||
$this->getSession()->getPage()->fillField('Body', $body);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getDefinedElements()
|
||||
{
|
||||
return array_merge(parent::getDefinedElements(), [
|
||||
'body' => '#sylius_static_content_body',
|
||||
'name' => '#sylius_static_content_name',
|
||||
'title' => '#sylius_static_content_title',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\StaticContent;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\CreatePageInterface as BaseCreatePageInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface CreatePageInterface extends BaseCreatePageInterface
|
||||
{
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function setTitle($title);
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name);
|
||||
|
||||
/**
|
||||
* @param string $body
|
||||
*/
|
||||
public function setBody($body);
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\StaticContent;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
class UpdatePage extends BaseUpdatePage implements UpdatePageInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function changeBodyTo($body)
|
||||
{
|
||||
$this->getElement('body')->setValue($body);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBody()
|
||||
{
|
||||
return $this->getElement('body')->getValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getDefinedElements()
|
||||
{
|
||||
return array_merge(parent::getDefinedElements(), [
|
||||
'body' => '#sylius_static_content_body',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Admin\StaticContent;
|
||||
|
||||
use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface as BaseUpdatePageInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface UpdatePageInterface extends BaseUpdatePageInterface
|
||||
{
|
||||
/**
|
||||
* @param string $body
|
||||
*/
|
||||
public function changeBodyTo($body);
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBody();
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Shop;
|
||||
|
||||
use Sylius\Behat\Page\SymfonyPage;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class StaticContentPage extends SymfonyPage implements StaticContentPageInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function access($path)
|
||||
{
|
||||
return $this->getDriver()->visit($this->makePathAbsolute($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function assertPageHasContent(StaticContent $staticContent)
|
||||
{
|
||||
$this->verify(['name' => $staticContent->getName()]);
|
||||
|
||||
Assert::contains($this->getSession()->getPage()->getHtml(), $staticContent->getTitle());
|
||||
Assert::contains($this->getSession()->getPage()->getHtml(), $staticContent->getBody());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getRouteName()
|
||||
{
|
||||
return 'sylius_shop_static_content_show';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Behat\Page\Shop;
|
||||
|
||||
use Sylius\Behat\Page\SymfonyPageInterface;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface StaticContentPageInterface extends SymfonyPageInterface
|
||||
{
|
||||
/**
|
||||
* @param string $path
|
||||
*/
|
||||
public function access($path);
|
||||
|
||||
/**
|
||||
* @param StaticContent $staticContent
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function assertPageHasContent(StaticContent $staticContent);
|
||||
}
|
||||
|
|
@ -18,12 +18,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.hook.phpcr" class="Sylius\Behat\Context\Hook\PHPCRContext">
|
||||
<argument type="service" id="__symfony_shared__.doctrine_phpcr.odm.document_manager" />
|
||||
<argument type="service" id="__symfony_shared__.doctrine_phpcr.initializer_manager" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.hook.test_theme" class="Sylius\Behat\Context\Hook\TestThemeContext">
|
||||
<argument type="service" id="__symfony_shared__.sylius.theme.test_theme_configuration_manager" />
|
||||
<tag name="fob.context_service" />
|
||||
|
|
|
|||
|
|
@ -174,14 +174,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.setup.route" class="Sylius\Behat\Context\Setup\RouteContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="__symfony__.sylius.fixture.example_factory.route" />
|
||||
<argument type="service" id="__symfony__.sylius.manager.route" />
|
||||
<argument type="service" id="__symfony__.sylius.repository.static_content" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.setup.admin_security" class="Sylius\Behat\Context\Setup\AdminSecurityContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="sylius.behat.admin_security" />
|
||||
|
|
@ -208,13 +200,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.setup.static_content" class="Sylius\Behat\Context\Setup\StaticContentContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="__symfony__.sylius.fixture.example_factory.static_content" />
|
||||
<argument type="service" id="__symfony__.sylius.manager.static_content" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.setup.taxation" class="Sylius\Behat\Context\Setup\TaxationContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="__symfony__.sylius.factory.tax_rate" />
|
||||
|
|
|
|||
|
|
@ -181,13 +181,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_routes" class="Sylius\Behat\Context\Ui\Admin\ManagingRoutesContext">
|
||||
<argument type="service" id="sylius.behat.page.admin.route.index" />
|
||||
<argument type="service" id="sylius.behat.page.admin.route.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.route.update" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_shipping_methods" class="Sylius\Behat\Context\Ui\Admin\ManagingShippingMethodsContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="sylius.behat.page.admin.shipping_method.index" />
|
||||
|
|
@ -198,13 +191,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_static_contents" class="Sylius\Behat\Context\Ui\Admin\ManagingStaticContentsContext">
|
||||
<argument type="service" id="sylius.behat.page.admin.static_content.index" />
|
||||
<argument type="service" id="sylius.behat.page.admin.static_content.create" />
|
||||
<argument type="service" id="sylius.behat.page.admin.static_content.update" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.admin.managing_tax_categories" class="Sylius\Behat\Context\Ui\Admin\ManagingTaxCategoriesContext">
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.index" />
|
||||
<argument type="service" id="sylius.behat.page.admin.tax_category.create" />
|
||||
|
|
@ -387,11 +373,6 @@
|
|||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.shop.static_content" class="Sylius\Behat\Context\Ui\Shop\StaticContentContext">
|
||||
<argument type="service" id="sylius.behat.page.shop.static_content.show" />
|
||||
<tag name="fob.context_service" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.behat.context.ui.email" class="Sylius\Behat\Context\Ui\EmailContext">
|
||||
<argument type="service" id="sylius.behat.shared_storage" />
|
||||
<argument type="service" id="__symfony__.sylius.behat.email_checker" />
|
||||
|
|
|
|||
|
|
@ -32,9 +32,7 @@
|
|||
<import resource="admin/product_variant.xml" />
|
||||
<import resource="admin/promotion.xml" />
|
||||
<import resource="admin/promotion_coupon.xml" />
|
||||
<import resource="admin/route.xml" />
|
||||
<import resource="admin/shipping_method.xml" />
|
||||
<import resource="admin/static_content.xml" />
|
||||
<import resource="admin/tax_category.xml" />
|
||||
<import resource="admin/tax_rate.xml" />
|
||||
<import resource="admin/taxon.xml" />
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<parameters>
|
||||
<parameter key="sylius.behat.page.admin.route.index.class">%sylius.behat.page.admin.crud.index.class%</parameter>
|
||||
<parameter key="sylius.behat.page.admin.route.create.class">Sylius\Behat\Page\Admin\Route\CreatePage</parameter>
|
||||
<parameter key="sylius.behat.page.admin.route.update.class">Sylius\Behat\Page\Admin\Route\UpdatePage</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="sylius.behat.page.admin.route.index" class="%sylius.behat.page.admin.route.index.class%" parent="sylius.behat.page.admin.crud.index" public="false">
|
||||
<argument type="string">route</argument>
|
||||
</service>
|
||||
<service id="sylius.behat.page.admin.route.create" class="%sylius.behat.page.admin.route.create.class%" parent="sylius.behat.page.admin.crud.create" public="false">
|
||||
<argument type="string">route</argument>
|
||||
</service>
|
||||
<service id="sylius.behat.page.admin.route.update" class="%sylius.behat.page.admin.route.update.class%" parent="sylius.behat.page.admin.crud.update" public="false">
|
||||
<argument type="string">route</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<parameters>
|
||||
<parameter key="sylius.behat.page.admin.static_content.index.class">%sylius.behat.page.admin.crud.index.class%</parameter>
|
||||
<parameter key="sylius.behat.page.admin.static_content.create.class">Sylius\Behat\Page\Admin\StaticContent\CreatePage</parameter>
|
||||
<parameter key="sylius.behat.page.admin.static_content.update.class">Sylius\Behat\Page\Admin\StaticContent\UpdatePage</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="sylius.behat.page.admin.static_content.index" class="%sylius.behat.page.admin.static_content.index.class%" parent="sylius.behat.page.admin.crud.index" public="false">
|
||||
<argument type="string">static_content</argument>
|
||||
</service>
|
||||
<service id="sylius.behat.page.admin.static_content.create" class="%sylius.behat.page.admin.static_content.create.class%" parent="sylius.behat.page.admin.crud.create" public="false">
|
||||
<argument type="string">static_content</argument>
|
||||
</service>
|
||||
<service id="sylius.behat.page.admin.static_content.update" class="%sylius.behat.page.admin.static_content.update.class%" parent="sylius.behat.page.admin.crud.update" public="false">
|
||||
<argument type="string">static_content</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
@ -17,7 +17,6 @@
|
|||
<import resource="shop/checkout.xml" />
|
||||
<import resource="shop/order.xml" />
|
||||
<import resource="shop/product.xml" />
|
||||
<import resource="shop/static_content.xml" />
|
||||
<import resource="shop/taxon.xml" />
|
||||
</imports>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<parameters>
|
||||
<parameter key="sylius.behat.page.shop.static_content.show.class">Sylius\Behat\Page\Shop\StaticContentPage</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="sylius.behat.page.shop.static_content.show" class="%sylius.behat.page.shop.static_content.show.class%" parent="sylius.behat.symfony_page" public="false" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
@ -22,9 +22,6 @@ imports:
|
|||
- suites/ui/admin/locale.yml
|
||||
- suites/ui/admin/login.yml
|
||||
- suites/ui/cart/shopping_cart.yml
|
||||
- suites/ui/cmf/managing_routes.yml
|
||||
- suites/ui/cmf/managing_static_contents.yml
|
||||
- suites/ui/cmf/static_content.yml
|
||||
- suites/ui/channel/managing_channels.yml
|
||||
- suites/ui/channel/products_accessibility_in_multiple_channels.yml
|
||||
- suites/ui/channel/theming.yml
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
default:
|
||||
suites:
|
||||
ui_managing_routes:
|
||||
contexts_services:
|
||||
- sylius.behat.context.hook.doctrine_orm
|
||||
- sylius.behat.context.hook.phpcr
|
||||
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.route
|
||||
- sylius.behat.context.setup.admin_security
|
||||
- sylius.behat.context.setup.static_content
|
||||
|
||||
- sylius.behat.context.ui.admin.managing_routes
|
||||
- sylius.behat.context.ui.admin.notification
|
||||
|
||||
filters:
|
||||
tags: "@managing_routes && @ui"
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
default:
|
||||
suites:
|
||||
ui_managing_static_contents:
|
||||
contexts_services:
|
||||
- sylius.behat.context.hook.doctrine_orm
|
||||
- sylius.behat.context.hook.phpcr
|
||||
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.admin_security
|
||||
- sylius.behat.context.setup.static_content
|
||||
|
||||
- sylius.behat.context.ui.admin.managing_static_contents
|
||||
- sylius.behat.context.ui.admin.notification
|
||||
|
||||
filters:
|
||||
tags: "@managing_static_contents && @ui"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
default:
|
||||
suites:
|
||||
ui_static_content:
|
||||
contexts_services:
|
||||
- sylius.behat.context.hook.doctrine_orm
|
||||
- sylius.behat.context.hook.phpcr
|
||||
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
- sylius.behat.context.setup.static_content
|
||||
|
||||
- sylius.behat.context.ui.shop.static_content
|
||||
|
||||
filters:
|
||||
tags: "@static_content && @ui"
|
||||
|
|
@ -32,7 +32,6 @@ final class MainMenuBuilder extends AbstractAdminMenuBuilder
|
|||
$this->addSalesSubMenu($menu);
|
||||
$this->addCustomersSubMenu($menu);
|
||||
$this->addMarketingSubMenu($menu);
|
||||
$this->addContentSubMenu($menu);
|
||||
$this->addConfigurationSubMenu($menu);
|
||||
|
||||
$this->eventDispatcher->dispatch(self::EVENT_NAME, new MenuBuilderEvent($this->factory, $menu));
|
||||
|
|
@ -127,29 +126,6 @@ final class MainMenuBuilder extends AbstractAdminMenuBuilder
|
|||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemInterface $menu
|
||||
*/
|
||||
private function addContentSubMenu(ItemInterface $menu)
|
||||
{
|
||||
$content = $menu
|
||||
->addChild('content')
|
||||
->setLabel('sylius.menu.admin.main.content.header')
|
||||
;
|
||||
|
||||
$content
|
||||
->addChild('static_contents', ['route' => 'sylius_admin_static_content_index'])
|
||||
->setLabel('sylius.menu.admin.main.content.static_contents')
|
||||
->setLabelAttribute('icon', 'file')
|
||||
;
|
||||
|
||||
$content
|
||||
->addChild('routes', ['route' => 'sylius_admin_route_index'])
|
||||
->setLabel('sylius.menu.admin.main.content.routes')
|
||||
->setLabelAttribute('icon', 'sitemap')
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ItemInterface $menu
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ imports:
|
|||
- { resource: "@SyliusAdminBundle/Resources/config/grids/product_variant.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/promotion.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/promotion_coupon.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/route.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/shipping_method.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/static_content.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/tax_category.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/tax_rate.yml" }
|
||||
- { resource: "@SyliusAdminBundle/Resources/config/grids/taxon.yml" }
|
||||
|
|
@ -28,12 +26,10 @@ imports:
|
|||
sylius_resource:
|
||||
drivers:
|
||||
- doctrine/orm
|
||||
- doctrine/phpcr-odm
|
||||
|
||||
sylius_grid:
|
||||
drivers:
|
||||
- doctrine/orm
|
||||
- doctrine/phpcr-odm
|
||||
templates:
|
||||
action:
|
||||
manage_coupons: "@SyliusAdmin/Promotion/Grid/Action/manageCoupons.html.twig"
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
sylius_grid:
|
||||
grids:
|
||||
sylius_admin_route:
|
||||
driver:
|
||||
name: doctrine/phpcr-odm
|
||||
options:
|
||||
class: "%sylius.model.route.class%"
|
||||
fields:
|
||||
name:
|
||||
type: string
|
||||
label: sylius.ui.name
|
||||
content:
|
||||
type: twig
|
||||
label: sylius.ui.content
|
||||
options:
|
||||
template: "@SyliusAdmin/Route/Grid/Field/content.html.twig"
|
||||
actions:
|
||||
main:
|
||||
create:
|
||||
type: create
|
||||
item:
|
||||
update:
|
||||
type: update
|
||||
delete:
|
||||
type: delete
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
sylius_grid:
|
||||
grids:
|
||||
sylius_admin_static_content:
|
||||
driver:
|
||||
name: doctrine/phpcr-odm
|
||||
options:
|
||||
class: "%sylius.model.static_content.class%"
|
||||
fields:
|
||||
name:
|
||||
type: string
|
||||
label: sylius.ui.name
|
||||
title:
|
||||
type: string
|
||||
label: sylius.ui.title
|
||||
filters:
|
||||
title:
|
||||
type: string
|
||||
label: sylius.ui.title
|
||||
body:
|
||||
type: string
|
||||
label: sylius.ui.body
|
||||
actions:
|
||||
main:
|
||||
create:
|
||||
type: create
|
||||
item:
|
||||
update:
|
||||
type: update
|
||||
delete:
|
||||
type: delete
|
||||
|
|
@ -64,18 +64,12 @@ sylius_admin_promotion_coupon:
|
|||
resource: "@SyliusAdminBundle/Resources/config/routing/promotion_coupon.yml"
|
||||
prefix: /promotions/{promotionId}/coupons/
|
||||
|
||||
sylius_admin_route:
|
||||
resource: "@SyliusAdminBundle/Resources/config/routing/route.yml"
|
||||
|
||||
sylius_admin_security:
|
||||
resource: "@SyliusAdminBundle/Resources/config/routing/security.yml"
|
||||
|
||||
sylius_admin_shipping_method:
|
||||
resource: "@SyliusAdminBundle/Resources/config/routing/shipping_method.yml"
|
||||
|
||||
sylius_admin_static_content:
|
||||
resource: "@SyliusAdminBundle/Resources/config/routing/static_content.yml"
|
||||
|
||||
sylius_admin_taxon:
|
||||
resource: "@SyliusAdminBundle/Resources/config/routing/taxon.yml"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
sylius_admin_route:
|
||||
resource: |
|
||||
alias: sylius.route
|
||||
section: admin
|
||||
templates: SyliusAdminBundle:Crud
|
||||
except: ['show', 'update', 'delete']
|
||||
redirect: index
|
||||
grid: sylius_admin_route
|
||||
permission: true
|
||||
type: sylius.resource
|
||||
|
||||
sylius_admin_route_update:
|
||||
path: /routes/{id}/edit
|
||||
methods: [GET, PUT]
|
||||
defaults:
|
||||
_controller: sylius.controller.route:updateAction
|
||||
_sylius:
|
||||
section: admin
|
||||
permission: true
|
||||
template: SyliusAdminBundle:Crud:update.html.twig
|
||||
vars:
|
||||
templates:
|
||||
breadcrumb: "@SyliusAdmin/Route/Update/_breadcrumb.html.twig"
|
||||
requirements:
|
||||
id: ".+"
|
||||
|
||||
sylius_admin_route_delete:
|
||||
path: /routes/{id}
|
||||
methods: [DELETE]
|
||||
defaults:
|
||||
_controller: sylius.controller.route:deleteAction
|
||||
_sylius:
|
||||
section: admin
|
||||
permission: true
|
||||
requirements:
|
||||
id: ".+"
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
sylius_admin_static_content:
|
||||
resource: |
|
||||
alias: sylius.static_content
|
||||
section: admin
|
||||
templates: SyliusAdminBundle:Crud
|
||||
except: ['show', 'update', 'delete']
|
||||
redirect: index
|
||||
grid: sylius_admin_static_content
|
||||
vars:
|
||||
all:
|
||||
templates:
|
||||
form: "@SyliusAdmin/StaticContent/_form.html.twig"
|
||||
|
||||
type: sylius.resource
|
||||
|
||||
sylius_admin_static_content_update:
|
||||
path: /static-contents/{id}/edit
|
||||
methods: [GET, PUT]
|
||||
defaults:
|
||||
_controller: sylius.controller.static_content:updateAction
|
||||
_sylius:
|
||||
section: admin
|
||||
template: "@SyliusAdmin/Crud/update.html.twig"
|
||||
vars:
|
||||
templates:
|
||||
form: "@SyliusAdmin/StaticContent/_form.html.twig"
|
||||
breadcrumb: "@SyliusAdmin/StaticContent/Update/_breadcrumb.html.twig"
|
||||
requirements:
|
||||
id: ".+"
|
||||
|
||||
sylius_admin_static_content_delete:
|
||||
path: /static-contents/{id}
|
||||
methods: [DELETE]
|
||||
defaults:
|
||||
_controller: sylius.controller.static_content:deleteAction
|
||||
_sylius:
|
||||
section: admin
|
||||
requirements:
|
||||
id: ".+"
|
||||
|
|
@ -32,7 +32,3 @@ sylius:
|
|||
sales:
|
||||
header: Sales
|
||||
orders: Orders
|
||||
content:
|
||||
header: Content
|
||||
static_contents: Static contents
|
||||
routes: Routes
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{{ data.title }}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{% import '@SyliusAdmin/Macro/breadcrumb.html.twig' as breadcrumb %}
|
||||
|
||||
{{ breadcrumb.crumble([
|
||||
{ label: 'sylius.ui.administration'|trans, url: path('sylius_admin_dashboard') },
|
||||
{ label: 'sylius.ui.routes'|trans, url: path('sylius_admin_customer_index') },
|
||||
{ label: resource.name },
|
||||
{ label: 'sylius.ui.edit'|trans }
|
||||
]) }}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{% import '@SyliusAdmin/Macro/breadcrumb.html.twig' as breadcrumb %}
|
||||
|
||||
{{ breadcrumb.crumble([
|
||||
{ label: 'sylius.ui.administration'|trans, url: path('sylius_admin_dashboard') },
|
||||
{ label: 'sylius.ui.static_contents'|trans, url: path('sylius_admin_customer_index') },
|
||||
{ label: resource.title },
|
||||
{ label: 'sylius.ui.edit'|trans }
|
||||
]) }}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{{ form_errors(form) }}
|
||||
|
||||
<div class="ui stackable grid">
|
||||
<div class="three wide column">
|
||||
{{ form_row(form.publishable) }}
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
<div class="thirteen wide column">
|
||||
{{ form_row(form.title) }}
|
||||
{{ form_row(form.body) }}
|
||||
</div>
|
||||
</div>
|
||||
5
src/Sylius/Bundle/ContentBundle/.gitignore
vendored
5
src/Sylius/Bundle/ContentBundle/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
vendor/
|
||||
bin/
|
||||
|
||||
composer.phar
|
||||
composer.lock
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\DependencyInjection;
|
||||
|
||||
use Sylius\Bundle\ContentBundle\Doctrine\ODM\PHPCR\StaticContentRepository;
|
||||
use Sylius\Bundle\ContentBundle\Document\ActionBlock;
|
||||
use Sylius\Bundle\ContentBundle\Document\ImagineBlock;
|
||||
use Sylius\Bundle\ContentBundle\Document\RedirectRoute;
|
||||
use Sylius\Bundle\ContentBundle\Document\ReferenceBlock;
|
||||
use Sylius\Bundle\ContentBundle\Document\Route;
|
||||
use Sylius\Bundle\ContentBundle\Document\SimpleBlock;
|
||||
use Sylius\Bundle\ContentBundle\Document\SlideshowBlock;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Sylius\Bundle\ContentBundle\Document\StringBlock;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\ActionBlockType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\ImagineBlockType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\RedirectRouteType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\ReferenceBlockType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\RouteType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\SimpleBlockType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\SlideshowBlockType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\StaticContentChoiceType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\StaticContentType;
|
||||
use Sylius\Bundle\ContentBundle\Form\Type\StringBlockType;
|
||||
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
|
||||
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
|
||||
use Sylius\Component\Resource\Factory\Factory;
|
||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
|
||||
final class Configuration implements ConfigurationInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('sylius_content');
|
||||
|
||||
$rootNode
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('driver')->defaultValue(SyliusResourceBundle::DRIVER_DOCTRINE_PHPCR_ODM)->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
$this->addResourcesSection($rootNode);
|
||||
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ArrayNodeDefinition $node
|
||||
*/
|
||||
private function addResourcesSection(ArrayNodeDefinition $node)
|
||||
{
|
||||
$node
|
||||
->children()
|
||||
->arrayNode('resources')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->arrayNode('route')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->variableNode('options')->end()
|
||||
->arrayNode('classes')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('model')->defaultValue(Route::class)->cannotBeEmpty()->cannotBeEmpty()->end()
|
||||
->scalarNode('controller')->defaultValue(ResourceController::class)->end()
|
||||
->scalarNode('repository')->cannotBeEmpty()->end()
|
||||
->scalarNode('factory')->defaultValue(Factory::class)->end()
|
||||
->arrayNode('form')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('default')->defaultValue(RouteType::class)->cannotBeEmpty()->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('validation_groups')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->arrayNode('default')
|
||||
->prototype('scalar')->end()
|
||||
->defaultValue(['sylius'])
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('static_content')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->variableNode('options')->end()
|
||||
->arrayNode('classes')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('model')->defaultValue(StaticContent::class)->cannotBeEmpty()->end()
|
||||
->scalarNode('controller')->defaultValue(ResourceController::class)->cannotBeEmpty()->end()
|
||||
->scalarNode('repository')->cannotBeEmpty(StaticContentRepository::class)->end()
|
||||
->scalarNode('factory')->defaultValue(Factory::class)->end()
|
||||
->arrayNode('form')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->scalarNode('default')->defaultValue(StaticContentType::class)->cannotBeEmpty()->end()
|
||||
->scalarNode('choice')->defaultValue(StaticContentChoiceType::class)->cannotBeEmpty()->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('validation_groups')
|
||||
->addDefaultsIfNotSet()
|
||||
->children()
|
||||
->arrayNode('default')
|
||||
->prototype('scalar')->end()
|
||||
->defaultValue(['sylius'])
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\DependencyInjection;
|
||||
|
||||
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
use Symfony\Component\DependencyInjection\Parameter;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* @author Paweł Jędrzejewski <pawel@sylius.org>
|
||||
*/
|
||||
final class SyliusContentExtension extends AbstractResourceExtension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(array $config, ContainerBuilder $container)
|
||||
{
|
||||
$config = $this->processConfiguration($this->getConfiguration($config, $container), $config);
|
||||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
|
||||
$this->registerResources('sylius', $config['driver'], $config['resources'], $container);
|
||||
|
||||
$loader->load('services.xml');
|
||||
|
||||
$staticContentRepository = $container->getDefinition('sylius.repository.static_content');
|
||||
$staticContentRepository->addArgument(new Parameter('cmf_content.persistence.phpcr.content_basepath'));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Doctrine\ODM\PHPCR;
|
||||
|
||||
use Doctrine\ODM\PHPCR\DocumentManagerInterface;
|
||||
use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Sylius\Bundle\ContentBundle\Repository\StaticContentRepositoryInterface;
|
||||
use Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\DocumentRepository;
|
||||
|
||||
/**
|
||||
* @author Paweł Jędrzejewski <pawel@sylius.org>
|
||||
*/
|
||||
class StaticContentRepository extends DocumentRepository implements StaticContentRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $staticContentPath;
|
||||
|
||||
/**
|
||||
* @param DocumentManagerInterface $dm
|
||||
* @param ClassMetadata $class
|
||||
* @param string $staticContentPath
|
||||
*/
|
||||
public function __construct(DocumentManagerInterface $dm, ClassMetadata $class, $staticContentPath)
|
||||
{
|
||||
parent::__construct($dm, $class);
|
||||
|
||||
$this->staticContentPath = $staticContentPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function findPublishedOneByName($name)
|
||||
{
|
||||
/** @var StaticContent|null $staticContent */
|
||||
$staticContent = $this->find($this->staticContentPath . '/' . $name);
|
||||
|
||||
if (null === $staticContent || !$staticContent->isPublishable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $staticContent;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Document;
|
||||
|
||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
||||
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route as BaseRoute;
|
||||
|
||||
/**
|
||||
* @author Magdalena Banasiak <magdalena.banasiak@lakion.com>
|
||||
*/
|
||||
class Route extends BaseRoute implements ResourceInterface
|
||||
{
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Document;
|
||||
|
||||
use Sylius\Component\Resource\Model\ResourceInterface;
|
||||
use Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent as BaseStaticContent;
|
||||
|
||||
/**
|
||||
* @author Paweł Jędrzejewski <pawel@sylius.org>
|
||||
*/
|
||||
class StaticContent extends BaseStaticContent implements ResourceInterface
|
||||
{
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Factory;
|
||||
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Sylius\Bundle\ContentBundle\Document\Route;
|
||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class RouteFactory implements FactoryInterface
|
||||
{
|
||||
/**
|
||||
* @var FactoryInterface
|
||||
*/
|
||||
private $decoratedFactory;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $documentManager;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $routeParentPath;
|
||||
|
||||
/**
|
||||
* @param FactoryInterface $decoratedFactory
|
||||
* @param ObjectManager $documentManager
|
||||
* @param string $routeParentPath
|
||||
*/
|
||||
public function __construct(FactoryInterface $decoratedFactory, ObjectManager $documentManager, $routeParentPath)
|
||||
{
|
||||
$this->decoratedFactory = $decoratedFactory;
|
||||
$this->documentManager = $documentManager;
|
||||
$this->routeParentPath = $routeParentPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createNew()
|
||||
{
|
||||
/** @var Route $route */
|
||||
$route = $this->decoratedFactory->createNew();
|
||||
$route->setParentDocument($this->documentManager->find(null, $this->routeParentPath));
|
||||
|
||||
return $route;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Factory;
|
||||
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
use Sylius\Component\Resource\Factory\FactoryInterface;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
final class StaticContentFactory implements FactoryInterface
|
||||
{
|
||||
/**
|
||||
* @var FactoryInterface
|
||||
*/
|
||||
private $decoratedFactory;
|
||||
|
||||
/**
|
||||
* @var ObjectManager
|
||||
*/
|
||||
private $documentManager;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $staticContentParentPath;
|
||||
|
||||
/**
|
||||
* @param FactoryInterface $decoratedFactory
|
||||
* @param ObjectManager $documentManager
|
||||
* @param string $staticContentParentPath
|
||||
*/
|
||||
public function __construct(FactoryInterface $decoratedFactory, ObjectManager $documentManager, $staticContentParentPath)
|
||||
{
|
||||
$this->decoratedFactory = $decoratedFactory;
|
||||
$this->documentManager = $documentManager;
|
||||
$this->staticContentParentPath = $staticContentParentPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createNew()
|
||||
{
|
||||
/** @var StaticContent $staticContent */
|
||||
$staticContent = $this->decoratedFactory->createNew();
|
||||
$staticContent->setParentDocument($this->documentManager->find(null, $this->staticContentParentPath));
|
||||
|
||||
return $staticContent;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Form\Type;
|
||||
|
||||
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @author Paweł Jędrzejewski <pawel@sylius.org>
|
||||
*/
|
||||
class RouteType extends AbstractResourceType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder, array $options = [])
|
||||
{
|
||||
$builder
|
||||
->add('name', null, [
|
||||
'label' => 'sylius.form.route.name',
|
||||
])
|
||||
->add('content', 'sylius_static_content_choice', [
|
||||
'label' => 'sylius.form.route.content',
|
||||
'property' => 'title',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'sylius_route';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Form\Type;
|
||||
|
||||
use Sylius\Bundle\ResourceBundle\Form\Type\ResourceChoiceType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* Static content choice type for phpcr_document choice form types.
|
||||
*
|
||||
* @author Jachim Coudenys <jachimcoudenys@gmail.com>
|
||||
*/
|
||||
class StaticContentChoiceType extends ResourceChoiceType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
$resolver->setDefaults(
|
||||
[
|
||||
'property' => 'id',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Form\Type;
|
||||
|
||||
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
/**
|
||||
* @author Paweł Jędrzejewski <pawel@sylius.org>
|
||||
*/
|
||||
class StaticContentType extends AbstractResourceType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder, array $options = [])
|
||||
{
|
||||
$builder
|
||||
->add('publishable', null, [
|
||||
'label' => 'sylius.form.static_content.publishable',
|
||||
])
|
||||
->add('id', 'text', [
|
||||
'label' => 'sylius.form.static_content.id',
|
||||
])
|
||||
->add('name', 'text', [
|
||||
'label' => 'sylius.form.static_content.internal_name',
|
||||
])
|
||||
->add('locale', 'text', [
|
||||
'label' => 'sylius.form.static_content.title',
|
||||
])
|
||||
->add('title', 'text', [
|
||||
'label' => 'sylius.form.static_content.title',
|
||||
])
|
||||
->add('routes', 'collection', [
|
||||
'type' => 'sylius_route',
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true,
|
||||
'by_reference' => false,
|
||||
'label' => 'sylius.form.static_content.routes',
|
||||
'cascade_validation' => true,
|
||||
])
|
||||
->add('body', 'textarea', [
|
||||
'required' => false,
|
||||
'label' => 'sylius.form.static_content.body',
|
||||
])
|
||||
->add('publishStartDate', 'datetime', [
|
||||
'label' => 'sylius.form.static_content.publish_start_date',
|
||||
'empty_value' => /* @Ignore */ ['year' => '-', 'month' => '-', 'day' => '-'],
|
||||
'time_widget' => 'text',
|
||||
])
|
||||
->add('publishEndDate', 'datetime', [
|
||||
'label' => 'sylius.form.static_content.publish_end_date',
|
||||
'empty_value' => /* @Ignore */ ['year' => '-', 'month' => '-', 'day' => '-'],
|
||||
'time_widget' => 'text',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'cascade_validation' => true,
|
||||
]);
|
||||
|
||||
parent::configureOptions($resolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'sylius_static_content';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
SyliusContentBundle [](http://travis-ci.org/Sylius/SyliusContentBundle)
|
||||
===================
|
||||
|
||||
Sylius
|
||||
------
|
||||
|
||||

|
||||
|
||||
Sylius is an Open Source eCommerce solution built from decoupled components with powerful API and the highest quality code. [Read more on sylius.org](http://sylius.org).
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Documentation is available on [**docs.sylius.org**](http://docs.sylius.org).
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
[This page](http://docs.sylius.org/en/latest/contributing/index.html) contains all the information about contributing to Sylius.
|
||||
|
||||
Follow Sylius' Development
|
||||
--------------------------
|
||||
|
||||
If you want to keep up with the updates and latest features, follow us on the following channels:
|
||||
|
||||
* [Official Blog](https://sylius.org/blog)
|
||||
* [Sylius on Twitter](https://twitter.com/Sylius)
|
||||
* [Sylius on Facebook](https://facebook.com/SyliusEcommerce)
|
||||
|
||||
Bug tracking
|
||||
------------
|
||||
|
||||
Sylius uses [GitHub issues](https://github.com/Sylius/Sylius/issues).
|
||||
If you have found bug, please create an issue.
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
License can be found [here](https://github.com/Sylius/Sylius/blob/master/LICENSE).
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
The bundle was originally created by [Paweł Jędrzejewski](http://pjedrzejewski.com).
|
||||
See the list of [contributors](https://github.com/Sylius/Sylius/contributors).
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace Sylius\Bundle\ContentBundle\Repository;
|
||||
|
||||
use Sylius\Bundle\ContentBundle\Document\StaticContent;
|
||||
|
||||
/**
|
||||
* @author Kamil Kokot <kamil.kokot@lakion.com>
|
||||
*/
|
||||
interface StaticContentRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return StaticContent|null
|
||||
*/
|
||||
public function findPublishedOneByName($name);
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
cmf_content:
|
||||
persistence:
|
||||
phpcr:
|
||||
content_basepath: /cms/pages
|
||||
document_class: "%sylius.model.static_content.class%"
|
||||
|
||||
cmf_core:
|
||||
publish_workflow: true
|
||||
persistence:
|
||||
phpcr:
|
||||
enabled: true
|
||||
|
||||
cmf_routing:
|
||||
chain:
|
||||
routers_by_id:
|
||||
router.default: 100
|
||||
dynamic:
|
||||
persistence:
|
||||
phpcr:
|
||||
enabled: true
|
||||
enable_initializer: true
|
||||
route_basepaths:
|
||||
- /cms/routes
|
||||
|
||||
doctrine_cache:
|
||||
providers:
|
||||
phpcr_meta: "%sylius.cache%"
|
||||
phpcr_nodes: "%sylius.cache%"
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<doctrine-mapping
|
||||
xmlns="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping
|
||||
https://github.com/doctrine/phpcr-odm/raw/master/doctrine-phpcr-odm-mapping.xsd"
|
||||
>
|
||||
|
||||
<document name="Sylius\Bundle\ContentBundle\Document\Route" />
|
||||
|
||||
</doctrine-mapping>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<doctrine-mapping
|
||||
xmlns="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping
|
||||
https://github.com/doctrine/phpcr-odm/raw/master/doctrine-phpcr-odm-mapping.xsd"
|
||||
>
|
||||
|
||||
<document name="Sylius\Bundle\ContentBundle\Document\StaticContent" />
|
||||
|
||||
</doctrine-mapping>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<services>
|
||||
<service id="sylius.factory.static_content.parent_path" class="Sylius\Bundle\ContentBundle\Factory\StaticContentFactory" decorates="sylius.factory.static_content">
|
||||
<argument type="service" id="sylius.factory.static_content.parent_path.inner" />
|
||||
<argument type="service" id="doctrine_phpcr.odm.document_manager" />
|
||||
<argument>%cmf_content.persistence.phpcr.content_basepath%</argument>
|
||||
</service>
|
||||
|
||||
<service id="sylius.factory.route.parent_path" class="Sylius\Bundle\ContentBundle\Factory\RouteFactory" decorates="sylius.factory.route">
|
||||
<argument type="service" id="sylius.factory.route.parent_path.inner" />
|
||||
<argument type="service" id="doctrine_phpcr.odm.document_manager" />
|
||||
<argument>%cmf_routing.dynamic.persistence.phpcr.route_basepath%</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">
|
||||
<class name="Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route">
|
||||
<property name="name">
|
||||
<constraint name="NotBlank">
|
||||
<option name="message">sylius.route.name.not_blank</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
<property name="content">
|
||||
<constraint name="NotBlank">
|
||||
<option name="message">sylius.route.content.not_blank</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
</class>
|
||||
</constraint-mapping>
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
||||
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.
|
||||
|
||||
-->
|
||||
|
||||
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">
|
||||
<class name="Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent">
|
||||
<property name="name">
|
||||
<constraint name="NotBlank">
|
||||
<option name="message">sylius.static_content.name.not_blank</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
<property name="title">
|
||||
<constraint name="NotBlank">
|
||||
<option name="message">sylius.static_content.title.not_blank</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
<property name="body">
|
||||
<constraint name="NotBlank">
|
||||
<option name="message">sylius.static_content.body.not_blank</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
<property name="publishStartDate">
|
||||
<constraint name="DateTime">
|
||||
<option name="message">sylius.static_content.start_date.invalid_date</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
<property name="publishEndDate">
|
||||
<constraint name="DateTime">
|
||||
<option name="message">sylius.static_content.end_date.invalid_date</option>
|
||||
<option name="groups">sylius</option>
|
||||
</constraint>
|
||||
</property>
|
||||
</class>
|
||||
</constraint-mapping>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2011-2016 Paweł Jędrzejewski
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<type
|
||||
xmlns:schema="http://schema.org/"
|
||||
typeof="schema:WebPage"
|
||||
>
|
||||
<children>
|
||||
<property property="schema:headline" identifier="title" tag-name="h1"/>
|
||||
<property property="schema:text" identifier="body" />
|
||||
</children>
|
||||
</type>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: الاسم
|
||||
static_content:
|
||||
menu_nodes: عقدة القائمة
|
||||
routes: طرق
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Імя
|
||||
parent: Бацькоўскі аб'ект
|
||||
static_content:
|
||||
body: Цела
|
||||
parent: Бацькоўскі аб'ект
|
||||
title: Назва
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Име
|
||||
parent: Източник
|
||||
static_content:
|
||||
body: Тяло
|
||||
internal_name: Вътрешно име
|
||||
menu_nodes: Меню деца
|
||||
parent: Родител
|
||||
routes: Маршрути
|
||||
title: Заглавие
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Nom
|
||||
static_content:
|
||||
body: Cos
|
||||
title: Títol
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Jméno
|
||||
parent: Rodič
|
||||
static_content:
|
||||
body: Tělo
|
||||
internal_name: Interní název
|
||||
menu_nodes: Nabídka uzlů
|
||||
parent: Rodič
|
||||
routes: Cesty
|
||||
title: Název
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Navn
|
||||
parent: Overordnede
|
||||
static_content:
|
||||
body: Krop
|
||||
parent: Overordnede
|
||||
title: Titel
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Inhalt
|
||||
name: Name
|
||||
parent: Übergeordnet
|
||||
static_content:
|
||||
body: Inhalt
|
||||
id: ID
|
||||
internal_name: Interner Name
|
||||
menu_nodes: Menüpunkte
|
||||
parent: Übergeordnet
|
||||
publish_end_date: Veröffentlichen bis
|
||||
publish_start_date: Veröffentlichen von
|
||||
publishable: Veröffentlicht
|
||||
routes: Pfade
|
||||
title: Titel
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Inhalt
|
||||
name: Name
|
||||
parent: Parent
|
||||
static_content:
|
||||
body: Body
|
||||
title: Titel
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Ονομασία
|
||||
static_content:
|
||||
title: Τίτλος
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Content
|
||||
name: Name
|
||||
parent: Parent
|
||||
|
||||
static_content:
|
||||
body: Body
|
||||
id: Id
|
||||
internal_name: Internal name
|
||||
menu_nodes: Menu nodes
|
||||
parent: Parent
|
||||
publish_end_date: Publish end date
|
||||
publish_start_date: Publish start date
|
||||
publishable: Published
|
||||
routes: Routes
|
||||
title: Title
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Contenido
|
||||
name: Nombre
|
||||
parent: Padre
|
||||
static_content:
|
||||
body: Cuerpo
|
||||
id: Id
|
||||
internal_name: Nombre interno
|
||||
menu_nodes: Nodos de menú
|
||||
parent: Padre
|
||||
publish_end_date: Fecha fin de publicación
|
||||
publish_start_date: Fecha de inicio de publicación
|
||||
publishable: Publicado
|
||||
routes: Rutas
|
||||
title: Título
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: محتوا
|
||||
name: نام
|
||||
parent: رده پدر
|
||||
static_content:
|
||||
body: متن
|
||||
id: شناسه
|
||||
internal_name: نام داخلی
|
||||
menu_nodes: زیرمجموعه های منو
|
||||
parent: رده پدر
|
||||
publish_end_date: پایان تاریخ انتشار
|
||||
publish_start_date: تاریخ شروع انتشار
|
||||
publishable: منتشر شده
|
||||
routes: آدرس های داخلی
|
||||
title: عنوان
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
parent: Vanhempi
|
||||
static_content:
|
||||
parent: Vanhempi
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Contenu
|
||||
name: Nom
|
||||
parent: Parent
|
||||
static_content:
|
||||
body: Corps
|
||||
id: Id
|
||||
internal_name: Nom interne
|
||||
menu_nodes: Nœuds de menu
|
||||
parent: Parent
|
||||
publish_end_date: Date de fin de publication
|
||||
publish_start_date: Date de début de publication
|
||||
publishable: Publié
|
||||
routes: Chemins
|
||||
title: Titre
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Naziv grupe
|
||||
parent: Nadređena kategorija
|
||||
static_content:
|
||||
body: Poruka
|
||||
menu_nodes: Čvor izbornika
|
||||
parent: Nadređena kategorija
|
||||
routes: Rute
|
||||
title: Naslov
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Név
|
||||
parent: Szülő
|
||||
static_content:
|
||||
body: Törzs
|
||||
menu_nodes: Menüpont hozzáadása
|
||||
parent: Szülő
|
||||
routes: Útvonalak
|
||||
title: Cím
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Konten
|
||||
name: Nama
|
||||
parent: Induk
|
||||
static_content:
|
||||
body: Body
|
||||
id: Id
|
||||
internal_name: Nama internal
|
||||
menu_nodes: Menu node
|
||||
parent: Induk
|
||||
publish_end_date: Tanggal terakhir publikasi
|
||||
publish_start_date: Tanggal mulai publikasi
|
||||
routes: Rute
|
||||
title: Judul
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Contenuto
|
||||
name: Nome
|
||||
parent: Genitore
|
||||
static_content:
|
||||
body: Testo
|
||||
id: Id
|
||||
internal_name: Nome interno
|
||||
menu_nodes: Nodi menu
|
||||
parent: Genitore
|
||||
publish_end_date: Data di fine pubblicazione
|
||||
publish_start_date: Data di inizio pubblicazione
|
||||
publishable: Pubblicato
|
||||
routes: Rotte
|
||||
title: Titolo
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Turinys
|
||||
name: Pavadinimas
|
||||
parent: Motininis elementas
|
||||
static_content:
|
||||
body: Bloko turinys
|
||||
id: Id
|
||||
internal_name: Vidinis pavadinimas
|
||||
menu_nodes: Meniu elementai
|
||||
parent: Motininis elementas
|
||||
publish_end_date: Publikavimo pabaigos data
|
||||
publish_start_date: Publikavimo pradžios data
|
||||
publishable: Paskelbta
|
||||
routes: Maršrutai
|
||||
title: Pavadinimas
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Inhoud
|
||||
name: Naam
|
||||
parent: Ouder
|
||||
static_content:
|
||||
body: Inhoud
|
||||
id: Id
|
||||
internal_name: Interne naam
|
||||
menu_nodes: Menu items
|
||||
parent: Ouder
|
||||
publish_end_date: Einddatum publicatie
|
||||
publish_start_date: Begindatum publicatie
|
||||
publishable: Gepubliceerd
|
||||
routes: Routes
|
||||
title: Titel
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Navn
|
||||
parent: Forelder
|
||||
static_content:
|
||||
body: Kropp
|
||||
menu_nodes: Menynoder
|
||||
parent: Forelder
|
||||
routes: Ruter
|
||||
title: Tittel
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Treść
|
||||
name: Nazwa
|
||||
parent: Rodzic
|
||||
static_content:
|
||||
body: Zawartość
|
||||
id: Id
|
||||
internal_name: Nazwa wewnętrzna
|
||||
menu_nodes: Węzły menu
|
||||
parent: Rodzic
|
||||
publish_end_date: Data zakończenia publikacji
|
||||
publish_start_date: Data publikacji
|
||||
publishable: Opublikowano
|
||||
routes: Ścieżki
|
||||
title: Tytuł
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
content: Conteúdo
|
||||
name: Nome
|
||||
parent: Pai
|
||||
static_content:
|
||||
body: Corpo
|
||||
id: Id.
|
||||
internal_name: Nome interno
|
||||
menu_nodes: Nós do menu
|
||||
parent: Pai
|
||||
publishable: Publicado
|
||||
routes: Rotas
|
||||
title: Título
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# This file is part of the Sylius package.
|
||||
# (c) Paweł Jędrzejewski
|
||||
|
||||
sylius:
|
||||
form:
|
||||
route:
|
||||
name: Nome
|
||||
parent: Pai
|
||||
static_content:
|
||||
body: Texto
|
||||
menu_nodes: Nó do menu
|
||||
parent: Pai
|
||||
routes: Rotas
|
||||
title: Título
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue