Skip to content
Snippets Groups Projects
Commit c8b78329 authored by Pierre Dureau's avatar Pierre Dureau Committed by Pierre Dureau
Browse files

Issue #3473852 by pdureau: Remove obsolete use of pattern

parent 81ff4daa
No related branches found
No related tags found
1 merge request!219Issue #3473852 by pdureau: Remove obsolete use of pattern
Pipeline #290330 passed with warnings
......@@ -6,7 +6,7 @@ use Drupal\Tests\ui_patterns\Functional\UiPatternsFunctionalTestBase;
use Drupal\Tests\ui_patterns\Traits\TestDataTrait;
/**
* Test pattern preview rendering.
* Test component rendering with Layout Builder.
*
* @group ui_patterns_field_formatters
*/
......
......@@ -7,7 +7,7 @@ use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Template\Attribute;
/**
* Renders a pattern element.
* Alter the rendering of a component element.
*/
class ComponentAlterer implements TrustedCallbackInterface {
......
......@@ -6,7 +6,7 @@ use Drupal\Tests\ui_patterns\Functional\UiPatternsFunctionalTestBase;
use Drupal\Tests\ui_patterns\Traits\TestDataTrait;
/**
* Test pattern preview rendering.
* Test components rendering as layouts.
*
* @group ui_patterns_layouts
*/
......
......@@ -16,7 +16,7 @@ use Drupal\views\Plugin\views\row\Fields;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Pattern Views row plugin.
* Render a single row with a component.
*
* @ingroup views_row_plugins
*/
......
......@@ -16,7 +16,7 @@ use Drupal\views\Plugin\views\style\StylePluginBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Style plugin to render items in a pattern field.
* Render all rows with a component.
*
* @ingroup views_style_plugins
*/
......
......@@ -6,9 +6,9 @@ use Drupal\Tests\ui_patterns\Functional\UiPatternsFunctionalTestBase;
use Drupal\Tests\ui_patterns\Traits\TestDataTrait;
/**
* Test pattern preview rendering.
* Test component rendering in views.
*
* @group ui_patterns_layouts
* @group ui_patterns_views
*/
class ViewsRenderTest extends UiPatternsFunctionalTestBase {
......
......@@ -233,7 +233,7 @@ class ComponentPluginManager extends SdcPluginManager implements CategorizingPlu
public function getCategories() {
// Fetch all categories from definitions and remove duplicates.
$categories = array_unique(array_values(array_map(function ($definition) {
return $definition['group'] ?? "Other";
return $definition['group'] ?? t("Other");
}, $this->getDefinitions())));
natcasesort($categories);
return array_values($categories);
......
......@@ -54,8 +54,6 @@ class FieldPropertySource extends FieldValueSourceBase {
*
* @return bool|float|int
* The value converted.
*
* @todo this part will be move into UI patterns.
*/
private function transTypeProp(mixed $value, array $prop_types): mixed {
foreach ($prop_types as $prop_type) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment