Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ShareTrait.php

trait ShareTrait

Hierarchy

  • trait \Symfony\Component\DependencyInjection\Loader\Configurator\Traits\ShareTrait

File

vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php, line 14

Namespace

Symfony\Component\DependencyInjection\Loader\Configurator\Traits
View source
trait ShareTrait {
    
    /**
     * Sets if the service must be shared or not.
     *
     * @return $this
     */
    public final function share(bool $shared = true) : static {
        $this->definition
            ->setShared($shared);
        return $this;
    }

}

Members

Title Sort descending Modifiers Object type Summary
ShareTrait::share final public function Sets if the service must be shared or not.
RSS feed
Powered by Drupal