Skip to content

[Issue] Allow filter directive processors to be used with the Widget template filter #29764

Closed
@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #28723: Allow filter directive processors to be used with the Widget template filter


Description (*)

This allows the use of filter directives with the Magento\Widget\Model\Template\Filter filter (which is used by CMS content). This makes extending the filter directives actually useful.

By applying the changes in this Pull Request, the following DI configuration also applies to this filter as well:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\Filter\Template">
        <arguments>
            <argument name="directiveProcessors" xsi:type="array">
                <item name="my-custom-directive" sortOrder="1000" xsi:type="object"><!--...--></item>
            </argument>
        </arguments>
    </type>
</config>

Manual testing scenarios (*)

  1. Create a custom filter directive via DI
  2. See this filter directive now being applied for CMS pages and CMS blocks

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: WidgetIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedPriority: P3May be fixed according to the position in the backlog.Progress: doneSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions