Skip to content

Commit

Permalink
Deployed 9cc6cd4 to 12.x with MkDocs 1.4.3 and mike 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 9, 2024
1 parent e9e8f8a commit 9736e2b
Show file tree
Hide file tree
Showing 10 changed files with 275 additions and 322 deletions.
4 changes: 2 additions & 2 deletions 12.x/bootstrap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5313,7 +5313,7 @@ <h1 id="the-drush-bootstrap-process">The Drush Bootstrap Process<a class="header
</div>
<p>Bootstrapping is done from a Symfony Console command hook. The different bootstrap levels are described below.</p>
<h2 id="none">none<a class="headerlink" href="#none" title="Permanent link">&para;</a></h2>
<p>Only run Drush <em>preflight</em>, without considering Drupal at all. Any code that operates on the Drush installation, and not specifically any Drupal directory, should bootstrap to this phase.</p>
<p>Only run Drush <em>preflight</em>, without considering Drupal at all. Any code that operates on the Drush installation, and not specifically any Drupal directory, should bootstrap to this phase. This Attribute and value may also be used on a command <em>class</em> when it wants to load before Drupal bootstrap is started. Commands that ship inside Drupal modules always bootstrap to full, regardless of <em>none</em> value.</p>
<h2 id="root">root<a class="headerlink" href="#root" title="Permanent link">&para;</a></h2>
<p>Set up and test for a valid Drupal root, either through the --root options, or evaluated based on the current working directory. Any code that interacts with an entire Drupal installation, and not a specific site on the Drupal installation should use this bootstrap phase.</p>
<h2 id="site">site<a class="headerlink" href="#site" title="Permanent link">&para;</a></h2>
Expand All @@ -5332,7 +5332,7 @@ <h2 id="max">max<a class="headerlink" href="#max" title="Permanent link">&para;<
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">June 4, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 9, 2024</span>


</small>
Expand Down
6 changes: 3 additions & 3 deletions 12.x/commands/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5269,7 +5269,7 @@ <h1 id="creating-custom-commands">Creating Custom Commands<a class="headerlink"
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<ol>
<li>Drush 12 expects commandfiles to use a <a href="../dependency-injection/#create-method">create() method</a> to inject Drupal and Drush dependencies. Prior versions used a <a href="https://www.drush.org/11.x/dependency-injection/#services-files">drush.services.yml file</a> which is now deprecated and will be removed in Drush 13.</li>
<li>You may now use <a href="https://github.com/drush-ops/drush/blob/13.x/src/Commands/AutowireTrait.php">Autowire</a> to inject Drupal and Drush dependencies. Prior approaches were using a [create() method](dependency-injection.md#create-method and using a <a href="https://www.drush.org/11.x/dependency-injection/#services-files">drush.services.yml file</a>. These are now deprecated.</li>
<li>Drush 12 expects all commandfiles in the <code>&lt;module-name&gt;/src/Drush/&lt;Commands|Generators&gt;</code> directory. The <code>Drush</code> subdirectory is a new requirement.</li>
</ol>
</div>
Expand All @@ -5279,7 +5279,7 @@ <h1 id="creating-custom-commands">Creating Custom Commands<a class="headerlink"
<li>Drush will prompt for the machine name of the module that should "own" the file. The module selected must already exist and be enabled. Use <code>drush generate module</code> to create a new module.</li>
<li>Drush will then report that it created a commandfile. Edit as needed.</li>
<li>Use the classes for the core Drush commands at <a href="https://github.com/drush-ops/drush/tree/12.x/src/Commands">/src/Commands</a> as inspiration and documentation.</li>
<li>See the <a href="../dependency-injection/">dependency injection docs</a> for interfaces you can implement to gain access to Drush config, Drupal site aliases, etc. Also note the <a href="../dependency-injection/#create-method">create() method</a> for injecting Drupal or Drush dependencies.</li>
<li>You may <a href="../dependency-injection/">inject dependencies</a> into a command instance.</li>
<li>Write PHPUnit tests based on <a href="https://github.com/drush-ops/drush/blob/12.x/docs/contribute/unish.md#drush-test-traits">Drush Test Traits</a>.</li>
</ol>
<h2 id="attributes-or-annotations">Attributes or Annotations<a class="headerlink" href="#attributes-or-annotations" title="Permanent link">&para;</a></h2>
Expand Down Expand Up @@ -5420,7 +5420,7 @@ <h2 id="global-commands-discovered-by-configuration">Global commands discovered
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">February 21, 2024</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 9, 2024</span>


</small>
Expand Down
94 changes: 22 additions & 72 deletions 12.x/dependency-injection/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 12.x/generators/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5247,7 +5247,7 @@
<h1 id="overview">Overview<a class="headerlink" href="#overview" title="Permanent link">&para;</a></h1>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Drush 11 and prior required generators to define a <a href="https://www.drush.org/11.x/dependency-injection/#services-files">drush.services.yml file</a>. This is no longer used with Drush 12+ generators. See <a href="../dependency-injection/#create-method">create() method</a> for injecting dependencies.</p>
<p>Drush 11 and prior required generators to define a <a href="https://www.drush.org/11.x/dependency-injection/#services-files">drush.services.yml file</a>. This is no longer used with Drush 12+ generators. See <a href="../dependency-injection/">docs</a> for injecting dependencies..</p>
</div>
<p>Generators jump start your coding by building all the boring boilerplate code for you. After running the <a href="../commands/generate/">generate command</a>, you have a guide for where to insert your custom logic.</p>
<p>Drush's generators reuse classes provided by the excellent <a href="https://github.com/Chi-teck/drupal-code-generator">Drupal Code Generator</a> project. See its <a href="https://github.com/Chi-teck/drupal-code-generator/tree/3.x/src/Command">Commands directory</a> for inspiration.</p>
Expand Down Expand Up @@ -5282,7 +5282,7 @@ <h2 id="site-wide-generators">Site-wide Generators<a class="headerlink" href="#s
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">June 7, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 9, 2024</span>


</small>
Expand Down
4 changes: 2 additions & 2 deletions 12.x/hooks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5243,7 +5243,7 @@ <h2 id="core-hooks">Core Hooks<a class="headerlink" href="#core-hooks" title="Pe
</ul>
<h2 id="custom-hooks">Custom Hooks<a class="headerlink" href="#custom-hooks" title="Permanent link">&para;</a></h2>
<p>Drush commands can define custom events that other command files can hook. You can find examples in <a href="https://github.com/drush-ops/drush/blob/12.x/src/Commands/core/CacheCommands.php">CacheCommands</a> and <a href="https://github.com/drush-ops/drush/blob/12.x/src/Drupal/Commands/sql/SanitizeCommands.php">SanitizeCommands</a></p>
<p>First, the command must implement CustomEventAwareInterface and use CustomEventAwareTrait, as described in the <a href="../dependency-injection/">dependency injection</a> documentation.</p>
<p>First, the command must implement CustomEventAwareInterface and use CustomEventAwareTrait, as described in the <a href="../dependency-injection/#inflection">dependency injection</a> documentation.</p>
<p>Then, the command may ask the provided hook manager to return a list of handlers with a certain attribute. In the example below, the <code>my-event</code> label is used:
<div class="highlight"><pre><span></span><code> <span class="sd">/**</span>
<span class="sd"> * This command uses a custom event &#39;my-event&#39; to collect data. Note that</span>
Expand Down Expand Up @@ -5294,7 +5294,7 @@ <h2 id="custom-hooks">Custom Hooks<a class="headerlink" href="#custom-hooks" tit
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">October 25, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 9, 2024</span>


</small>
Expand Down
2 changes: 1 addition & 1 deletion 12.x/search/search_index.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions 12.x/site-alias-manager/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5203,8 +5203,11 @@ <h1 id="site-alias-manager">Site Alias Manager<a class="headerlink" href="#site-
<p>The <a href="https://github.com/consolidation/site-alias/blob/4.0.1/src/SiteAliasManager.php">Site Alias Manager (SAM)</a> service is used to retrieve information about one or all of the site aliases for the current installation.</p>
<ul>
<li>An informative example is the <a href="https://github.com/drush-ops/drush/blob/12.x/src/Commands/core/BrowseCommands.php">browse command</a></li>
<li>A commandfile gets access to the SAM by implementing the SiteAliasManagerAwareInterface and <em>use</em>ing the SiteAliasManagerAwareTrait trait. Then you gain access via <code>$this-&gt;siteAliasManager()</code>.</li>
<li>If an alias was used for the current request, it is available via <code>$this-&gt;siteAliasManager()-&gt;getself()</code>.</li>
<li>A commandfile gets access to the SAM as follows:
<div class="highlight"><pre><span></span><code><span class="p">#[</span><span class="nd">Autowire</span><span class="p">(</span><span class="nx">service</span><span class="o">:</span> <span class="nx">DependencyInjection</span><span class="o">::</span><span class="na">SITE_ALIAS_MANAGER</span><span class="p">)]</span>
<span class="k">private</span> <span class="nx">readonly</span> <span class="nx">SiteAliasManagerInterface</span> <span class="nv">$siteAliasManager</span>
</code></pre></div></li>
<li>If an alias was used for the current request, it is available via <code>$this-&gt;siteAliasManager-&gt;getself()</code>.</li>
<li>The SAM generally deals in <a href="https://github.com/consolidation/site-alias/blob/main/src/SiteAlias.php">SiteAlias</a> objects. That is how any given site alias is represented. See its methods for determining things like whether the alias points to a local host or remote host.</li>
<li><a href="../site-aliases/">Site alias docs</a>.</li>
<li><a href="https://raw.githubusercontent.com/drush-ops/drush/11.x/examples/Commands/SiteAliasAlterCommands.php">Dynamically alter site aliases</a>.</li>
Expand All @@ -5216,7 +5219,7 @@ <h1 id="site-alias-manager">Site Alias Manager<a class="headerlink" href="#site-
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">June 7, 2023</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">March 9, 2024</span>


</small>
Expand Down
Loading

0 comments on commit 9736e2b

Please sign in to comment.