Transfer data from php to custom plugin

Hello everyone, 

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? 

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.


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

        $text = new TextStruct();

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

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


        if ($config->isStatic()) {
        //return 'test12';
        echo ("");
        echo ("");

How can I debug in php resolver?

I tried var_dump but still nothing…


Thank you,