drupal/core/modules/sdc
Dave Long 654b1f2074
Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider methods must be declared static and public
2024-02-14 13:38:28 +00:00
..
src Issue #3385283 by e0ipso, smustgrave, idiaz.roncero, jldust, wotnak: Components without props throw error 2023-11-15 09:51:49 +00:00
tests Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider methods must be declared static and public 2024-02-14 13:38:28 +00:00
README.txt
sdc.info.yml
sdc.module Issue #3414263 by quietone, andypost: Change help headings for WCAG 2.0 2024-01-15 14:55:37 +02:00
sdc.services.yml Issue #2932518 by kim.pepper, joachim, bradjones1, voleger, cliddell, gapple, Xano, andregp, andypost, neclimdul, rpayanm, Hardik_Patel_12, NWOM, smustgrave, dawehner, alexpott, daffie, larowlan, Berdir, mstrelan, xjm, dagmar: Deprecate watchdog_exception 2023-04-28 13:36:57 +10:00

README.txt

The API of Single Directory Components includes:

  - The component plugin manager (the service with name plugin.manager.sdc).
    This service will be needed by modules that need to find and instantiate
    components.
  - The exceptions. Code using Single Directory Components can rely, and extend,
    the exceptions provided by the experimental module.
  - The folder structure of a component and the naming conventions of the files
    in it.
  - The structure of the component metadata (the my-component.component.yml).
    Note that the metadata of the component is described, and optionally
    validated, by the schema in metadata.schema.json (this file is for internal validation and not part of the API).
  - The render element and its class \Drupal\sdc\Element\ComponentElement.
  - The naming convention for the ID when using Twig's include, embed, and
    extends. This naming convention is [module/theme]:[component machine name].
    See the example below.

{% embed 'my-theme:my-component' with { prop1: content.field_for_prop1 } %}
  {% block slot1 %}
    {{ content|without('field_for_prop1') }}
  {% endblock %}
{% endembed %}

This way  of specifying the component for Twig's include, embed, and
extends('my-theme:my-component' in the example) will not change, as it is
considered an API.