PHP code example of kunstmaan / fixtures-bundle

1. Go to this page and download the library: Download kunstmaan/fixtures-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kunstmaan / fixtures-bundle example snippets




namespace Acme\SomeBundle\DataFixtures\ORM\DefaultSiteGenerator;

use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Kunstmaan\FixturesBundle\Loader\FixtureLoader;

class YamlFixtures extends FixtureLoader implements OrderedFixtureInterface
{
    protected function getFixtures()
    {
        return [
            __DIR__ . '/media.yml',
            __DIR__ . '/default.yml',
        ];
    }

    /**
     * Get the order of this fixture
     *
     * @return integer
     */
    public function getOrder()
    {
        return 50;
    }
}

public function adminUser()
{
    return 'admin';
}