From e51c2feab01d4e082a9ef77e31bcdc2e4959abcc Mon Sep 17 00:00:00 2001 From: Lukasz Cybula Date: Tue, 19 Mar 2019 16:11:07 +0100 Subject: [PATCH] Implement GroupFixtureInterface in fixture class --- DataFixtures/ORM/LoadCommunityTypeData.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DataFixtures/ORM/LoadCommunityTypeData.php b/DataFixtures/ORM/LoadCommunityTypeData.php index 08e0036..4cb7b29 100644 --- a/DataFixtures/ORM/LoadCommunityTypeData.php +++ b/DataFixtures/ORM/LoadCommunityTypeData.php @@ -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', @@ -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) {