mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 21:26:37 +00:00
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Entity\Fixture;
|
|
|
|
use App\Entity;
|
|
use Doctrine\Common\DataFixtures\AbstractFixture;
|
|
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
|
|
use Doctrine\Persistence\ObjectManager;
|
|
|
|
class StationMount extends AbstractFixture implements DependentFixtureInterface
|
|
{
|
|
public function load(ObjectManager $manager): void
|
|
{
|
|
/** @var Entity\Station $station */
|
|
$station = $this->getReference('station');
|
|
|
|
$mount_radio = new Entity\StationMount($station);
|
|
$mount_radio->setName('/radio.mp3');
|
|
$mount_radio->setIsDefault(true);
|
|
$manager->persist($mount_radio);
|
|
|
|
$mount_mobile = new Entity\StationMount($station);
|
|
$mount_mobile->setName('/mobile.mp3');
|
|
$mount_mobile->setAutodjBitrate(64);
|
|
$manager->persist($mount_mobile);
|
|
|
|
$manager->flush();
|
|
}
|
|
|
|
/**
|
|
* @return string[]
|
|
*/
|
|
public function getDependencies(): array
|
|
{
|
|
return [
|
|
Station::class,
|
|
];
|
|
}
|
|
}
|