Enables/disables autowiring.

@param bool $autowired

@return $this
4941
public function setAutowired($autowired)
    {
        $this->changes['autowired'] = true;

        $this->autowired = (bool) $autowired;

        return $this;
    }
839072
private function setupAutowire(array $config, ContainerBuilder $container)
    {
        if (!method_exists($container, 'autowire')) {
            // This container have no support for services auto-wiring
            return;
        }

        if (!$config['autowire']) {
            // Auto-wiring for default client is explicitly disabled
            return;
        }

        if (!array_key_exists('default', $config['clients'])) {
            // No "default" client is available
            return;
        }

        if ($container->hasDefinition(Client::class)) {
            throw new LogicException('Default Elasticsearch client autowiring setup is enabled, ' .
                'but Elastica client service is already defined in container');
        }

        $container->setAlias(Client::class, $this->createClientId('default'));
    }
439613
public function includeInactive($enable = true)
    {
        $this->includeInactive = (bool) $enable;

        $this->refreshSettingDependentCriteria();

        return $this;
    }
857803
public function stop(): DriverInterface
    {
        if ($this->process) {
            $this->process->stop();
            unset($this->process);
        }

        return $this;
    }
1317792
public function setAutoEtag()
    {
        $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true)));

        return $this;
    }
842906
public function hasAutowiringType($type)
    {
        @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED);

        return isset($this->autowiringTypes[$type]);
    }
523595
public function canBeDisabled()
    {
        $this
            ->addDefaultsIfNotSet()
            ->treatFalseLike(['enabled' => false])
            ->treatTrueLike(['enabled' => true])
            ->treatNullLike(['enabled' => true])
            ->children()
                ->booleanNode('enabled')
                    ->defaultTrue()
        ;

        return $this;
    }
451774
public function checkFieldsActivation()
    {
        foreach ($this->getFormObject()->getConfiguration()->getFields() as $field) {
            if (false === $this->result->fieldIsDeactivated($field)) {
                $this->checkFieldActivation($field);
            }
        }

        return $this;
    }
404967
public function unbind()
    {
        if ($this->isBinded()) {
            $this->getSocket()->unbind($this->dsn);
            $this->dsn = null;
        }

        return $this;
    }
638494
public function setDisabled(bool $disabled = true)
    {
        if ($disabled) {
            $this->field->addProp('disabled');
        } else {
            $this->field->removeProp('disabled');
        }

        return $this;
    }
1185760
public static function enable()
    {
        Field::macro(self::MACRO_METHOD, function (Field $builder) {
            return new static($builder->getClassMetadata(), $builder->getName());
        });

        ManyToOne::macro(self::MACRO_METHOD, function (ManyToOne $builder) {
            return new static($builder->getClassMetadata(), $builder->getRelation());
        });
    }
229546
public static function enable()
    {
        Field::macro(self::MACRO_METHOD, function (Field $field) {
            return new static($field->getClassMetadata(), $field->getName());
        });
    }
388180
public function toggleAutoRedirection($enabled)
    {
        $driver = $this->getSession()->getDriver();
        if ($driver instanceof KernelDriver) {
            /** @var Client $client */
            $client = $driver->getClient();

            if ($enabled === 'enabled') {
                $client->followRedirects(true);
            } else {
                $client->followRedirects(false);

            }
        }
    }
24093
public static void enableAutoRead(Channel channel) {
    if (!channel.config().isAutoRead()) {
      channel.config().setAutoRead(true);
      channel.read();
    }
  }
58570
protected function assertType(string $class, string $param, ?\ReflectionType $reflType): void
    {
        if ($reflType === null || !$reflType instanceof \ReflectionNamedType) {
            throw new AutowireException("Unable to autowire {$class}: Unknown type for parameter '{$param}'.");
        }

        if ($reflType->isBuiltin()) {
            throw new AutowireException("Unable to autowire {$class}: "
                . "Build-in type '" . $reflType->getName() . "' for parameter '{$param}' can't be used as container "
                . "id. Please use annotations.");
        }
    }
1118848
public function passive($passive = true)
    {
        $this->passive = $passive;

        if ($this->connection) {
            $result = ftp_pasv($this->connection, $passive);
            if ($result === false) {
                throw new Exception('Unable to change passive mode');
            }
        }

        return $this;
    }
1363609
public function setDisabled(bool $disabled) : Element
    {
        if ($disabled) {
            $this->getTag()->setAttribute('disabled', 'disabled');
        } else {
            $this->getTag()->removeAttribute('disabled');
        }

        return $this;
    }