I am trying to get a save button on a dynamic row field to fire but on loading a CMS page I get the following error:
Class Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit\SaveButton
does not exist";i:1;s:9517:"#0 /home/forge/hiflex.brancomdev.nl/public/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Brancom\\PageExt...')
But the Class exists on the specified location, you can see the class here:
<?php
namespace Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit;
use Magento\Customer\Block\Adminhtml\Edit\GenericButton;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
class SaveButton extends GenericButton implements ButtonProviderInterface
{
public function getButtonData()
{
$url = $this->getUrl('brancom/row/save');
return [
'label' => __('Save Rows'),
'class' => 'save primary',
'on_click' => "setLocation('". $url ."'')",
'sort_order' => 90,
];
}
}
The call to the class below:
<fieldset name="related_product">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">dynamic_rows.dynamic_rows_data_source</item>
<item name="deps" xsi:type="string">dynamic_rows.dynamic_rows_data_source</item>
</item>
<item name="label" xsi:type="string" translate="true">Dynamic Rows</item>
<item name="config" xsi:type="array">
<item name="dataScope" xsi:type="string">data</item>
<item name="namespace" xsi:type="string">dynamic_rows</item>
</item>
<item name="template" xsi:type="string">templates/form/collapsible</item>
<item name="buttons" xsi:type="array">
<item name="save" xsi:type="string">Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit\SaveButton</item>
</item>
</argument>
The file rests in the correct location but I still seem to do something wrong, does anybody know why my class does not exist according to magento?