-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c3a543
commit 76547bf
Showing
68 changed files
with
1,398 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
codeception/_data/plugins/Assets-1.0.0/Resource/assets/assets.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* assets.js | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "ec-cube/assets", | ||
"version": "1.0.0", | ||
"description": "アセットを含むプラグイン", | ||
"type": "eccube-plugin", | ||
"extra": { | ||
"code": "Assets" | ||
} | ||
} |
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
codeception/_data/plugins/Assets-1.0.1/Resource/assets/assets.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* assets.js | ||
*/ |
3 changes: 3 additions & 0 deletions
3
codeception/_data/plugins/Assets-1.0.1/Resource/assets/updated.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* updated.js | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "ec-cube/assets", | ||
"version": "1.0.1", | ||
"description": "アセットを含むプラグイン", | ||
"type": "eccube-plugin", | ||
"extra": { | ||
"code": "Assets" | ||
} | ||
} |
Binary file not shown.
67 changes: 67 additions & 0 deletions
67
codeception/_data/plugins/Boomerang-1.0.0/Controller/BoomerangController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Plugin\Boomerang\Controller; | ||
|
||
|
||
use Eccube\Controller\AbstractController; | ||
use Eccube\Entity\Cart; | ||
use Eccube\Repository\CartRepository; | ||
use Plugin\Boomerang\Entity\Bar; | ||
use Symfony\Component\HttpFoundation\JsonResponse; | ||
use Symfony\Component\Routing\Annotation\Route; | ||
|
||
class BoomerangController extends AbstractController | ||
{ | ||
/** | ||
* @var CartRepository | ||
*/ | ||
private $cartRepository; | ||
|
||
public function __construct(CartRepository $cartRepository) | ||
{ | ||
$this->cartRepository = $cartRepository; | ||
} | ||
|
||
/** | ||
* @Route("/boomerang", name="boomerang") | ||
* @return JsonResponse | ||
*/ | ||
public function index() | ||
{ | ||
/** @var Cart[] $list */ | ||
$list = $this->cartRepository->findAll(); | ||
$ids = array_map(function (Cart $c) { return $c->getId(); }, $list); | ||
|
||
return $this->json($ids); | ||
} | ||
|
||
/** | ||
* @Route("/boomerang/new") | ||
*/ | ||
public function new() | ||
{ | ||
$Bar = new Bar(); | ||
$Bar->name = 'bar'; | ||
$this->entityManager->persist($Bar); | ||
|
||
$Cart = new Cart(); | ||
$Cart->setTotalPrice(0); | ||
$Cart->setDeliveryFeeTotal(0); | ||
$Cart->bar = $Bar; | ||
|
||
$this->cartRepository->save($Cart); | ||
$this->entityManager->flush(); | ||
|
||
return $this->redirectToRoute('boomerang'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Plugin\Boomerang\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
if (!class_exists('Plugin\Boomerang\Entity\Bar')) { | ||
|
||
/** | ||
* @ORM\Table(name="dtb_bar") | ||
* @ORM\InheritanceType("SINGLE_TABLE") | ||
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255) | ||
* @ORM\HasLifecycleCallbacks() | ||
* @ORM\Entity(repositoryClass="Plugin\Boomerang\Repository\BarRepository") | ||
*/ | ||
class Bar | ||
{ | ||
/** | ||
* @var int | ||
* | ||
* @ORM\Column(name="id", type="integer", options={"unsigned":true}) | ||
* @ORM\Id | ||
* @ORM\GeneratedValue(strategy="IDENTITY") | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="name", type="string", length=255) | ||
*/ | ||
public $name; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
codeception/_data/plugins/Boomerang-1.0.0/Entity/CartTrait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Plugin\Boomerang\Entity; | ||
|
||
use Doctrine\ORM\Mapping as ORM; | ||
use Eccube\Annotation\EntityExtension; | ||
|
||
/** | ||
* @EntityExtension("Eccube\Entity\Cart") | ||
*/ | ||
trait CartTrait | ||
{ | ||
/** | ||
* @var boolean | ||
* @ORM\Column(name="is_boomerang", type="boolean", options={"default":false}, nullable=true) | ||
*/ | ||
public $is_boomerang; | ||
|
||
/** | ||
* @var Bar | ||
* @ORM\ManyToOne(targetEntity="Plugin\Boomerang\Entity\Bar") | ||
* @ORM\JoinColumns({ | ||
* @ORM\JoinColumn(name="bar_id", referencedColumnName="id") | ||
* }) | ||
*/ | ||
public $bar; | ||
} |
39 changes: 39 additions & 0 deletions
39
codeception/_data/plugins/Boomerang-1.0.0/PluginManager.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Plugin\Boomerang; | ||
|
||
use Eccube\Plugin\AbstractPluginManager; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
class PluginManager extends AbstractPluginManager | ||
{ | ||
public function install(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Install Boomerang 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
} | ||
|
||
public function enable(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Enable Boomerang 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
} | ||
|
||
public function disable(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Disable Boomerang 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
} | ||
|
||
public function update(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Update Boomerang 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
} | ||
|
||
public function uninstall(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Uninstall Boomerang 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
codeception/_data/plugins/Boomerang-1.0.0/Repository/BarRepository.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Plugin\Boomerang\Repository; | ||
|
||
|
||
use Eccube\Repository\AbstractRepository; | ||
use Plugin\Boomerang\Entity\Bar; | ||
use Doctrine\Persistence\ManagerRegistry as RegistryInterface; | ||
|
||
class BarRepository extends AbstractRepository | ||
{ | ||
public function __construct(RegistryInterface $registry) | ||
{ | ||
parent::__construct($registry, Bar::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"ec-cube\/boomerang","description":"\u30d6\u30fc\u30e1\u30e9\u30f3","version":"1.0.0","type":"eccube-plugin","require":{"ec-cube\/plugin-installer":"^2.0@dev"},"extra":{"code":"Boomerang","id":100}} |
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
codeception/_data/plugins/Boomerang10-1.0.0/Entity/BarTrait.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace Plugin\Boomerang10\Entity; | ||
|
||
|
||
use Eccube\Annotation\EntityExtension; | ||
use Doctrine\ORM\Mapping as ORM; | ||
|
||
/** | ||
* @EntityExtension("Plugin\Boomerang\Entity\Bar") | ||
*/ | ||
trait BarTrait | ||
{ | ||
/** | ||
* @var string | ||
* | ||
* @ORM\Column(name="mail", type="string", length=255, nullable=true) | ||
*/ | ||
public $mail; | ||
} |
57 changes: 57 additions & 0 deletions
57
codeception/_data/plugins/Boomerang10-1.0.0/PluginManager.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace Plugin\Boomerang10; | ||
|
||
use Doctrine\ORM\EntityManager; | ||
use Eccube\Plugin\AbstractPluginManager; | ||
use Plugin\Boomerang\Entity\Bar; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
class PluginManager extends AbstractPluginManager | ||
{ | ||
public function install(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Install Boomerang10 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
/** @var EntityManager $entityManager */ | ||
$entityManager = $container->get('doctrine.orm.entity_manager'); | ||
$bar = new Bar(); | ||
$bar->id = 2; | ||
$bar->name = 'Boomerang10 1.0.0'; | ||
$bar->mail = '[email protected]'; | ||
$entityManager->persist($bar); | ||
$entityManager->flush($bar); | ||
} | ||
|
||
public function enable(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Enable Boomerang10 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
$entityManager = $container->get('doctrine.orm.entity_manager'); | ||
$entityManager->find(Bar::class, 2); | ||
} | ||
|
||
public function disable(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Disable Boomerang10 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
$entityManager = $container->get('doctrine.orm.entity_manager'); | ||
$entityManager->find(Bar::class, 2); | ||
} | ||
|
||
public function update(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Update Boomerang10 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
$entityManager = $container->get('doctrine.orm.entity_manager'); | ||
$entityManager->find(Bar::class, 2); | ||
} | ||
|
||
public function uninstall(array $config, ContainerInterface $container) { | ||
echo "*******************************************".PHP_EOL; | ||
echo "Uninstall Boomerang10 1.0.0".PHP_EOL; | ||
echo "*******************************************".PHP_EOL; | ||
$entityManager = $container->get('doctrine.orm.entity_manager'); | ||
$entityManager->find(Bar::class, 2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "ec-cube/boomerang10", | ||
"description": "ブーメラン・10", | ||
"version": "1.0.0", | ||
"type": "eccube-plugin", | ||
"require": { | ||
"ec-cube/boomerang": "~1.0.0" | ||
}, | ||
"extra": { | ||
"code": "Boomerang10", | ||
"id": 102 | ||
} | ||
} |
Binary file not shown.
28 changes: 28 additions & 0 deletions
28
codeception/_data/plugins/Bundle-1.0.0/Bundle/BundleBundle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of EC-CUBE | ||
* | ||
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. | ||
* | ||
* http://www.ec-cube.co.jp/ | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Plugin\Bundle\Bundle; | ||
|
||
use Plugin\Bundle\DependencyInjection\Compiler\BundleCompilerPass; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class BundleBundle extends Bundle | ||
{ | ||
public function build(ContainerBuilder $container) | ||
{ | ||
parent::build($container); | ||
|
||
$container->addCompilerPass(new BundleCompilerPass()); | ||
} | ||
} |
Oops, something went wrong.