Skip to content

Instantly share code, notes, and snippets.

View mikeemoo's full-sized avatar

Mikeemoo mikeemoo

  • Leeds, United Kingdom
View GitHub Profile
<?php
namespace Lowpress\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class Site
<?php
namespace Lowpress\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="discr", type="string")
<?php
namespace Lowpress\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class HtmlPage extends Path
<?php
namespace Lowpress\ExampleBundle\Entity;
use Doctrine\ORM\Mapping as ORM,
Lowpress\CmsBundle as CMS;
/**
* @ORM\Entity
*/
<?php
namespace Lowpress\CmsBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Lowpress\CmsBundle\Entity\Site;
class LoadSiteData extends AbstractFixture implements OrderedFixtureInterface
<?php
namespace Lowpress\CmsBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Lowpress\CmsBundle\Entity\Path;
use Lowpress\CmsBundle\Entity\HtmlPage;
@mikeemoo
mikeemoo / LoadContentPageData.php
Created May 29, 2012 14:54
LoadContentPageData
<?php
namespace Lowpress\ExampleBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Lowpress\ExampleBundle\Entity\ContentPage;
class LoadContentPageData extends AbstractFixture implements OrderedFixtureInterface
@mikeemoo
mikeemoo / InheritanceFunctionalTest.php
Created May 29, 2012 14:55
InheritanceFunctionalTest
<?php
namespace Lowpress\CmsBundle\Tests\Entity;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class InheritanceFunctionalTest extends WebTestCase
{
/**
@mikeemoo
mikeemoo / ExampleInheritanceFunctionalTest.php
Created May 29, 2012 14:56
ExampleInheritanceFunctionalTest
<?php
namespace Lowpress\ExampleBundle\Tests\Entity;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class ExampleInheritanceFunctionalTest extends WebTestCase
{
/**
@mikeemoo
mikeemoo / LowpressCmsBundle.php
Created May 29, 2012 15:23
LowpressCmsBundle
<?php
namespace Lowpress\CmsBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle,
Lowpress\CmsBundle\Doctrine\InheritanceListener;
class LowpressCmsBundle extends Bundle
{