# Transfer data from php to custom plugin

**URL:** https://forum.shopware.com/t/transfer-data-from-php-to-custom-plugin/70655
**Category:** Plugins
**Tags:** customelements
**Created:** [4. November 2020 um 12:17 UTC](https://forum.shopware.com/t/transfer-data-from-php-to-custom-plugin/70655 "2020-11-04T12:17:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Florida](https://avatars.discourse-cdn.com/v4/letter/f/fbc32d/32.png) [@Florida](https://forum.shopware.com/u/Florida)
#### Post date: [4. November 2020 um 12:17 UTC](https://forum.shopware.com/t/transfer-data-from-php-to-custom-plugin/70655/1 "2020-11-04T12:17:06Z")

</div>

Hello everyone,&nbsp;

I created a custom plugin with cms blocks. Everything works fine until now.

I want to transfer data from php to my custom block, can someone help me how to do it?&nbsp;

I create a Resolver in Core directory and inserted it in service.config. I made some testing but nothing is changed in frontend. I think resolver is loaded because if I remove one “use …” I can see in frontend error of trying to load resolver.

```
 &nbsp;

public function enrich(CmsSlotEntity $slot, ResolverContext $resolverContext, ElementDataCollection $result): void
    {

        $text = new TextStruct();
        $slot->setData('$text');

        $config = $slot->getFieldConfig()->get('content');
        if (!$config) {
            return;
        }

        if ($config->isMapped() && $resolverContext instanceof EntityResolverContext) {
            $content = $this->resolveEntityValue($resolverContext->getEntity(), $config->getValue());

            $text->setContent('test1');
        }

        if ($config->isStatic()) {
            $text->setContent('test2');
        }
        //return 'test12';
        echo ("");
            var_dump('$text');
        echo ("");
    }

```

How can I&nbsp;debug in php resolver?

I tried var\_dump but still nothing…

&nbsp;

Thank you,&nbsp;

Florida
