PHP code example of therefinery / relatedentriesautomation

1. Go to this page and download the library: Download therefinery/relatedentriesautomation 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/ */

    

therefinery / relatedentriesautomation example snippets

twig
{% set queryinfo = craft.relatedentriesautomation.filterEntries(block.sourceCriteria) %}
{% set entryIds = craft.relatedentriesautomation.entityQueryWithIds(queryinfo.result) %}
<pre>{{ queryinfo | json_encode(constant('JSON_PRETTY_PRINT')) }}</pre>
{% set relatedEntries = craft.entries(entryIds).visibility('not  hidden') %}