PHP code example of unrealmanu / ez-content-field-filter
1. Go to this page and download the library: Download unrealmanu/ez-content-field-filter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
unrealmanu / ez-content-field-filter example snippets
$fieldHelper->setContent($content);
use unrealmanu\ezFieldIterator\Filters as FieldHelper;
/**
* @return string|null
*/
function myFilter():?string
{
$fieldHelper = new FieldHelper();
$fieldHelper->setContent($content);
$fieldHelper->setClass(ImageValue::class);
$fieldHelper->setValueField('uri');
return $fieldHelper->getFirstChildren();
//return $fieldHelper->getChildren();
}