Skip to content

Commit

Permalink
Merge pull request #28 from chives/dev
Browse files Browse the repository at this point in the history
Implement GroupFixtureInterface in fixture class
  • Loading branch information
rn0 authored Mar 19, 2019
2 parents 19bb4ff + e51c2fe commit a6745b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion DataFixtures/ORM/LoadCommunityTypeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

namespace FSi\Bundle\TerytDatabaseBundle\DataFixtures\ORM;

use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use FSi\Bundle\TerytDatabaseBundle\Entity\CommunityType;

class LoadCommunityTypeData implements ORMFixtureInterface
class LoadCommunityTypeData implements ORMFixtureInterface, FixtureGroupInterface
{
protected $communityTypes = [
1 => 'gmina miejska',
Expand All @@ -27,6 +28,11 @@ class LoadCommunityTypeData implements ORMFixtureInterface
9 => 'delegatura gminy miejskiej'
];

public static function getGroups(): array
{
return ['teryt'];
}

public function load(ObjectManager $manager): void
{
foreach ($this->communityTypes as $type => $name) {
Expand Down

0 comments on commit a6745b4

Please sign in to comment.