try to create a simple plugin (magento 2.4.3-p1) :
But when compile got a : “In PluginListGenerator.php line 326:
Plugin class FsebModuleAPluginCatalogModelProduct doesn’t exist
”
Here is the code
appcodeFsebModuleAregistration.php
<?php
MagentoFrameworkComponentComponentRegistrar::register(
MagentoFrameworkComponentComponentRegistrar::MODULE,
'Fseb_ModuleA',
__DIR__
);
appcodeFsebModuleAetcmodule.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Fseb_ModuleA" setup_version="1.1.0"/>
</config>
appcodeFsebModuleAetcfrontenddi.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<type name="MagentoCatalogModelProduct">
<plugin name="Fseb_ModuleA" type="FsebModuleAPluginCatalogModelProduct"/>
</type>
</config>
appcodeFsebModuleAPluginCatalogModelProduct.php
class Product
{
public function afterGetName(MagentoCatalogModelProduct $subject, $result)
{
$title = 'lalalala';
return $title;
}
}
Could you help ?