src/Manager.php
public function createData(ResourceInterface $resource, $scopeIdentifier = null, Scope $parentScopeInstance = null)
    {
        if ($parentScopeInstance !== null) {
            return $this->scopeFactory->createChildScopeFor($this, $parentScopeInstance, $resource, $scopeIdentifier);
        }

        return $this->scopeFactory->createScopeFor($this, $resource, $scopeIdentifier);
    }
public function createData(ResourceInterface $resource, $scopeIdentifier = null, Scope $parentScopeInstance = null)
    {
        if ($parentScopeInstance !== null) {
            return $this->scopeFactory->createChildScopeFor($this, $parentScopeInstance, $resource, $scopeIdentifier);
        }

        return $this->scopeFactory->createScopeFor($this, $resource, $scopeIdentifier);
    }
public function createData ( ResourceInterface $ resource , $ scopeIdentifier = null , Scope $ parentScopeInstance = null ) { if ( $ parentScopeInstance !== null ) { return $ this -> scopeFactory -> createChildScopeFor ( $ this , $ parentScopeInstance , $ resource , $ scopeIdentifier ) ; } return $ this -> scopeFactory -> createScopeFor ( $ this , $ resource , $ scopeIdentifier ) ; }
Create Data.

Main method to kick this all off. Make a resource then pass it over, and use toArray()

@param ResourceInterface $resource
@param string            $scopeIdentifier
@param Scope             $parentScopeInstance

@return Scope
Create Data .