public function load(ObjectManager $objectManager)
    {
        /**
         * @var ObjectDirector $attributeDirector
         * @var ObjectDirector $attributeValueDirector
         */
        $attributeDirector = $this->getDirector('attribute');
        $attributeValueDirector = $this->getDirector('attribute_value');

        /**
         * Sizes.
         */
        $sizeAttribute = $attributeDirector
            ->create()
            ->setName('Size')
            ->setEnabled(true);

        $attributeDirector->save($sizeAttribute);
        $this->addReference('attribute-size', $sizeAttribute);

        $smallValue = $attributeValueDirector
            ->create()
            ->setValue('Small')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($smallValue);
        $this->addReference('value-size-small', $smallValue);

        $mediumValue = $attributeValueDirector
            ->create()
            ->setValue('Medium')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($mediumValue);
        $this->addReference('value-size-medium', $mediumValue);

        $largeValue = $attributeValueDirector
            ->create()
            ->setValue('Large')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($largeValue);
        $this->addReference('value-size-large', $largeValue);

        /**
         * Colors.
         */
        $colorAttribute = $attributeDirector
            ->create()
            ->setName('Color')
            ->setEnabled(true);

        $attributeDirector->save($colorAttribute);
        $this->addReference('attribute-color', $colorAttribute);

        $blueValue = $attributeValueDirector
            ->create()
            ->setValue('Blue')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($blueValue);
        $this->addReference('value-color-blue', $blueValue);

        $whiteValue = $attributeValueDirector
            ->create()
            ->setValue('White')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($whiteValue);
        $this->addReference('value-color-white', $whiteValue);

        $redValue = $attributeValueDirector
            ->create()
            ->setValue('Red')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($redValue);
        $this->addReference('value-color-red', $redValue);
    }
public function load(ObjectManager $objectManager)
    {
        /**
         * @var ObjectDirector $attributeDirector
         * @var ObjectDirector $attributeValueDirector
         */
        $attributeDirector = $this->getDirector('attribute');
        $attributeValueDirector = $this->getDirector('attribute_value');

        /**
         * Sizes.
         */
        $sizeAttribute = $attributeDirector
            ->create()
            ->setName('Size')
            ->setEnabled(true);

        $attributeDirector->save($sizeAttribute);
        $this->addReference('attribute-size', $sizeAttribute);

        $smallValue = $attributeValueDirector
            ->create()
            ->setValue('Small')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($smallValue);
        $this->addReference('value-size-small', $smallValue);

        $mediumValue = $attributeValueDirector
            ->create()
            ->setValue('Medium')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($mediumValue);
        $this->addReference('value-size-medium', $mediumValue);

        $largeValue = $attributeValueDirector
            ->create()
            ->setValue('Large')
            ->setAttribute($sizeAttribute);

        $attributeValueDirector->save($largeValue);
        $this->addReference('value-size-large', $largeValue);

        /**
         * Colors.
         */
        $colorAttribute = $attributeDirector
            ->create()
            ->setName('Color')
            ->setEnabled(true);

        $attributeDirector->save($colorAttribute);
        $this->addReference('attribute-color', $colorAttribute);

        $blueValue = $attributeValueDirector
            ->create()
            ->setValue('Blue')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($blueValue);
        $this->addReference('value-color-blue', $blueValue);

        $whiteValue = $attributeValueDirector
            ->create()
            ->setValue('White')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($whiteValue);
        $this->addReference('value-color-white', $whiteValue);

        $redValue = $attributeValueDirector
            ->create()
            ->setValue('Red')
            ->setAttribute($colorAttribute);

        $attributeValueDirector->save($redValue);
        $this->addReference('value-color-red', $redValue);
    }
public function load ( ObjectManager $ objectManager ) { /**
         * @var ObjectDirector $attributeDirector
         * @var ObjectDirector $attributeValueDirector
         */ $ attributeDirector = $ this -> getDirector ( 'attribute' ) ; $ attributeValueDirector = $ this -> getDirector ( 'attribute_value' ) ; /**
         * Sizes.
         */ $ sizeAttribute = $ attributeDirector -> create ( ) -> setName ( 'Size' ) -> setEnabled ( true ) ; $ attributeDirector -> save ( $ sizeAttribute ) ; $ this -> addReference ( 'attribute-size' , $ sizeAttribute ) ; $ smallValue = $ attributeValueDirector -> create ( ) -> setValue ( 'Small' ) -> setAttribute ( $ sizeAttribute ) ; $ attributeValueDirector -> save ( $ smallValue ) ; $ this -> addReference ( 'value-size-small' , $ smallValue ) ; $ mediumValue = $ attributeValueDirector -> create ( ) -> setValue ( 'Medium' ) -> setAttribute ( $ sizeAttribute ) ; $ attributeValueDirector -> save ( $ mediumValue ) ; $ this -> addReference ( 'value-size-medium' , $ mediumValue ) ; $ largeValue = $ attributeValueDirector -> create ( ) -> setValue ( 'Large' ) -> setAttribute ( $ sizeAttribute ) ; $ attributeValueDirector -> save ( $ largeValue ) ; $ this -> addReference ( 'value-size-large' , $ largeValue ) ; /**
         * Colors.
         */ $ colorAttribute = $ attributeDirector -> create ( ) -> setName ( 'Color' ) -> setEnabled ( true ) ; $ attributeDirector -> save ( $ colorAttribute ) ; $ this -> addReference ( 'attribute-color' , $ colorAttribute ) ; $ blueValue = $ attributeValueDirector -> create ( ) -> setValue ( 'Blue' ) -> setAttribute ( $ colorAttribute ) ; $ attributeValueDirector -> save ( $ blueValue ) ; $ this -> addReference ( 'value-color-blue' , $ blueValue ) ; $ whiteValue = $ attributeValueDirector -> create ( ) -> setValue ( 'White' ) -> setAttribute ( $ colorAttribute ) ; $ attributeValueDirector -> save ( $ whiteValue ) ; $ this -> addReference ( 'value-color-white' , $ whiteValue ) ; $ redValue = $ attributeValueDirector -> create ( ) -> setValue ( 'Red' ) -> setAttribute ( $ colorAttribute ) ; $ attributeValueDirector -> save ( $ redValue ) ; $ this -> addReference ( 'value-color-red' , $ redValue ) ; }
Loads sample fixtures for Attribute entities.

@param ObjectManager $objectManager
Loads sample fixtures for Attribute entities .