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
3f99af5
commit 8605c42
Showing
2 changed files
with
102 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
namespace AppBundle\DataFixtures\ORM; | ||
|
||
use Doctrine\Common\DataFixtures\FixtureInterface; | ||
use Doctrine\Common\Persistence\ObjectManager; | ||
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use AppBundle\Entity\Inquiry; | ||
|
||
class LoadInquiryData implements FixtureInterface, ContainerAwareInterface | ||
{ | ||
/** | ||
* @var ContainerInterface | ||
*/ | ||
private $container; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function setContainer(ContainerInterface $container = null) | ||
{ | ||
$this->container = $container; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function load(ObjectManager $manager) | ||
{ | ||
$inquiry1 = new Inquiry(); | ||
$inquiry1->setName('フランツ・クサーヴァー・モーツァルト'); | ||
$inquiry1->setEmail('mozart@example.com'); | ||
$inquiry1->setTel('000-1111-2222'); | ||
$inquiry1->setType(0); | ||
$inquiry1->setContent('私の作った曲を演奏していただけませんか?'); | ||
$inquiry1->setProcessStatus(1); | ||
$inquiry1->setProcessMemo('返信済'); | ||
$manager->persist($inquiry1); | ||
|
||
$inquiry2 = new Inquiry(); | ||
$inquiry2->setName('ニコロ・パガニーニ'); | ||
$inquiry2->setEmail('paganini@example.com'); | ||
$inquiry2->setTel('012-1111-3333'); | ||
$inquiry2->setType(1); | ||
$inquiry2->setContent('バイオリンパートの奏者として応募したいのですが、選考はいつ行っていますか?私は今月末頃なら東京に滞在しています。'); | ||
$inquiry2->setProcessStatus(0); | ||
$manager->persist($inquiry2); | ||
|
||
$manager->flush(); | ||
} | ||
} |
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,51 @@ | ||
<?php | ||
namespace AppBundle\DataFixtures\ORM; | ||
|
||
use Doctrine\Common\DataFixtures\FixtureInterface; | ||
use Doctrine\Common\Persistence\ObjectManager; | ||
use Symfony\Component\DependencyInjection\ContainerAwareInterface; | ||
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
use AppBundle\Entity\Inquiry; | ||
|
||
class LoadInquiryData implements FixtureInterface, ContainerAwareInterface | ||
{ | ||
/** | ||
* @var ContainerInterface | ||
*/ | ||
private $container; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function setContainer(ContainerInterface $container = null) | ||
{ | ||
$this->container = $container; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
public function load(ObjectManager $manager) | ||
{ | ||
$inquiry1 = new Inquiry(); | ||
$inquiry1->setName('フランツ・クサーヴァー・モーツァルト'); | ||
$inquiry1->setEmail('mozart@example.com'); | ||
$inquiry1->setTel('000-1111-2222'); | ||
$inquiry1->setType(0); | ||
$inquiry1->setContent('私の作った曲を演奏していただけませんか?'); | ||
$inquiry1->setProcessStatus(1); | ||
$inquiry1->setProcessMemo('返信済'); | ||
$manager->persist($inquiry1); | ||
|
||
$inquiry2 = new Inquiry(); | ||
$inquiry2->setName('ニコロ・パガニーニ'); | ||
$inquiry2->setEmail('paganini@example.com'); | ||
$inquiry2->setTel('012-1111-3333'); | ||
$inquiry2->setType(1); | ||
$inquiry2->setContent('バイオリンパートの奏者として応募したいのですが、選考はいつ行っていますか?私は今月末頃なら東京に滞在しています。'); | ||
$inquiry2->setProcessStatus(0); | ||
$manager->persist($inquiry2); | ||
|
||
$manager->flush(); | ||
} | ||
} |