<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
visuellverstehen / statamic-content-renderer example snippets
use VV\ContentRenderer\Renderer;
// ...
$renderer = new Renderer();
$renderer->setContent($entry, 'my_replicator_field');
$renderer->setView('sets');
$content = $renderer->render();
namespace App\SearchTransformers;
use VV\ContentRenderer\Renderer;
class MyReplicatorFieldTransformer
{
public function handle($value, $field, $searchable)
{
$renderer = new Renderer();
$renderer->setContent($searchable, 'my_replicator_field');
$renderer->setView('sets');
return $renderer->render();
}
}
$renderer = (new Renderer())->$withLinkTargets();
// read more <a href="https://visuellverstehen.de">about the author</a> of this package
// becomes: read more about the author (https://visuellverstehen.de) of this package