1. Go to this page and download the library: Download novactive/ezextrabundle 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/ */
namespace Yoochoose\Bundle\GeneralBundle\ChildrenProvider;
use Novactive\Bundle\eZExtraBundle\EventListener\Type;
use eZ\Publish\API\Repository\Values\Content\Query;
class PersonalizationEngine extends Type
{
//its also use as default to get the full view children
public function getChildren($viewParameters, SiteAccess $siteAccess = null)
{
return $this->contentHelper->contentList( $this->location->id, [ 'article' ], array( new Query\SortClause\Location\Priority( Query::SORT_ASC ) ), 10);
}
public function getLineChildren( $viewParameters )
{
...
}
}
public function loadReverseRelations(ContentInfo $contentInfo, int $offset = 0, int $limit = -1): RelationList