Skip to content
Snippets Groups Projects
Verified Commit 5601dc41 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3455513 by xjm, e0ipso: "Single-Directory Components" needs to be...

Issue #3455513 by xjm, e0ipso: "Single-Directory Components" needs to be hyphenated because of English grammar and content style rules

(cherry picked from commit 1a487f3b)
parent 6f52b5e5
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #205531 passed
...@@ -403,7 +403,7 @@ protected function parseLibraryInfo($extension, $path) { ...@@ -403,7 +403,7 @@ protected function parseLibraryInfo($extension, $path) {
} }
} }
// Core also provides additional libraries that don't come from the YAML, // Core also provides additional libraries that don't come from the YAML,
// file nor the hook_library_info_build. They come from single directory // file nor the hook_library_info_build. They come from single-directory
// component definitions. // component definitions.
$additional_libraries = $extension === 'core' $additional_libraries = $extension === 'core'
? $this->librariesForComponents() ? $this->librariesForComponents()
...@@ -478,10 +478,10 @@ protected function applyLibrariesMovedOverrides(array $library, string $library_ ...@@ -478,10 +478,10 @@ protected function applyLibrariesMovedOverrides(array $library, string $library_
} }
/** /**
* Builds the dynamic library definitions for single directory components. * Builds the dynamic library definitions for single-directory components.
* *
* @return array * @return array
* The core library definitions for Single Directory Components. * The core library definitions for Single-Directory Components.
*/ */
protected function librariesForComponents(): array { protected function librariesForComponents(): array {
// Iterate over all the components to get the CSS and JS files. // Iterate over all the components to get the CSS and JS files.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
use Drupal\Core\Render\Component\Exception\InvalidComponentDataException; use Drupal\Core\Render\Component\Exception\InvalidComponentDataException;
/** /**
* Provides a Single Directory Component render element. * Provides a Single-Directory Component render element.
* *
* Properties: * Properties:
* - #component: The machine name of the component. * - #component: The machine name of the component.
...@@ -100,7 +100,7 @@ private function generateComponentTemplate( ...@@ -100,7 +100,7 @@ private function generateComponentTemplate(
array $slots_alter_callbacks, array $slots_alter_callbacks,
array &$context, array &$context,
): string { ): string {
$template = '{# This template was dynamically generated by single directory components #}' . PHP_EOL; $template = '{# This template was dynamically generated by single-directory components #}' . PHP_EOL;
$template .= sprintf('{%% embed \'%s\' %%}', $id); $template .= sprintf('{%% embed \'%s\' %%}', $id);
$template .= PHP_EOL; $template .= PHP_EOL;
foreach ($slots as $slot_name => $slot_value) { foreach ($slots as $slot_name => $slot_value) {
......
name: Single Directory Components name: Single-Directory Components
type: module type: module
description: 'Allows discovery and rendering of self-contained UI components.' description: 'Allows discovery and rendering of self-contained UI components.'
version: VERSION version: VERSION
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment