public function addToManager(Manager $manager)
    {
        $this->registerFixedTypes($manager);
        $this->registerPeripheralTypes($manager);

        $this->extend('onBeforeAddToManager', $manager);

        // Add all DataObjects to the manager
        foreach ($this->types as $scaffold) {
            $scaffold->addToManager($manager);
            $inheritanceScaffolder = new InheritanceScaffolder(
                $scaffold->getDataObjectClass(),
                StaticSchema::config()->get('inheritanceTypeSuffix')
            );
            // Due to shared ancestry, it's inevitable that the same union type will get added multiple times.
            if (!$manager->hasType($inheritanceScaffolder->getName())) {
                $inheritanceScaffolder->addToManager($manager);
            }
        }

        foreach ($this->queries as $scaffold) {
            $scaffold->addToManager($manager);
        }

        foreach ($this->mutations as $scaffold) {
            $scaffold->addToManager($manager);
        }

        $this->extend('onAfterAddToManager', $manager);
    }
public function addToManager(Manager $manager)
    {
        $this->registerFixedTypes($manager);
        $this->registerPeripheralTypes($manager);

        $this->extend('onBeforeAddToManager', $manager);

        // Add all DataObjects to the manager
        foreach ($this->types as $scaffold) {
            $scaffold->addToManager($manager);
            $inheritanceScaffolder = new InheritanceScaffolder(
                $scaffold->getDataObjectClass(),
                StaticSchema::config()->get('inheritanceTypeSuffix')
            );
            // Due to shared ancestry, it's inevitable that the same union type will get added multiple times.
            if (!$manager->hasType($inheritanceScaffolder->getName())) {
                $inheritanceScaffolder->addToManager($manager);
            }
        }

        foreach ($this->queries as $scaffold) {
            $scaffold->addToManager($manager);
        }

        foreach ($this->mutations as $scaffold) {
            $scaffold->addToManager($manager);
        }

        $this->extend('onAfterAddToManager', $manager);
    }
public function addToManager ( Manager $ manager ) { $ this -> registerFixedTypes ( $ manager ) ; $ this -> registerPeripheralTypes ( $ manager ) ; $ this -> extend ( 'onBeforeAddToManager' , $ manager ) ; // Add all DataObjects to the manager foreach ( $ this -> types as $ scaffold ) { $ scaffold -> addToManager ( $ manager ) ; $ inheritanceScaffolder = new InheritanceScaffolder ( $ scaffold -> getDataObjectClass ( ) , StaticSchema :: config ( ) -> get ( 'inheritanceTypeSuffix' ) ) ; // Due to shared ancestry, it's inevitable that the same union type will get added multiple times. if ( ! $ manager -> hasType ( $ inheritanceScaffolder -> getName ( ) ) ) { $ inheritanceScaffolder -> addToManager ( $ manager ) ; } } foreach ( $ this -> queries as $ scaffold ) { $ scaffold -> addToManager ( $ manager ) ; } foreach ( $ this -> mutations as $ scaffold ) { $ scaffold -> addToManager ( $ manager ) ; } $ this -> extend ( 'onAfterAddToManager' , $ manager ) ; }
Adds every DataObject and its dependencies to the Manager.

@param Manager $manager
Adds every DataObject and its dependencies to the Manager .