DNProject::canCreateEnvironments PHP Метод

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

Only admins can create environments for now. Also, we need to check the value of AllowedEnvironmentType which dictates which backend to use to render the form.
public canCreateEnvironments ( Member | null $member = null ) : boolean
$member Member | null
Результат boolean
    public function canCreateEnvironments($member = null)
    {
        $envType = $this->AllowedEnvironmentType;
        if ($envType) {
            $env = Injector::inst()->get($envType);
            if ($env instanceof EnvironmentCreateBackend) {
                return $this->allowed(DNRoot::ALLOW_CREATE_ENVIRONMENT, $member);
            }
        }
        return false;
    }