Pantheon\Terminus\Models\Environment::initializeBindings PHP Метод

initializeBindings() публичный Метод

Initializes the test/live environments on a newly created site and clones content from previous environment (e.g. test clones dev content, live clones test content.)
public initializeBindings ( ) : Workflow
Результат Workflow In-progress workflow
    public function initializeBindings()
    {
        if ($this->id == 'test') {
            $from_env_id = 'dev';
        } elseif ($this->id == 'live') {
            $from_env_id = 'test';
        }
        $params = ['annotation' => sprintf('Create the %s environment', $this->id), 'clone_database' => ['from_environment' => $from_env_id], 'clone_files' => ['from_environment' => $from_env_id]];
        $workflow = $this->getWorkflows()->create('create_environment', compact('params'));
        return $workflow;
    }