Dataflow is a free project implemented by Code Rhapsodie whose goal is to easily manage input and output data flows in your Symfony project.
Its integration with the eZ Platform CMS replaces the old SQLi Import extension used on eZ Publish.
eZ Dataflow version 2.2 was recently released and provides a ready-to-use filter for most cases.
This filter will avoid saving eZ content that has not been changed since the last run of the feed.
Here is the list of fields (attributes) natively managed by the filter:
If the content type of the stream contains only fields of this type, then the filter can be used natively. Otherwise, you will need to add a field comparison service.
Note: Using the filter with a content type with unmanaged fields is counterproductive. The processing time will increase because the contents will be compared while a type of unmanaged field is considered different and will cause the content to be systematically updated.
<pre><?php
use CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator;
use eZ\Publish\Core\FieldType\Value;
//[...]
class MyFieldComparator extends AbstractFieldComparator
{
//[...]
protected function compareValues(Value $currentValue, Value $newValue): bool
{
// Return true if values are identical, false if values are different.
}
}</pre>
Then register it as a Symfony service with the coderhapsodie.ezdataflow.field_comparator tag and the type of fields processed by your comparator.
<pre># Service declaration
App\FieldComparator\MyFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'my_field_type_identifier' }</pre>
Your service is ready, you can use the filter in your stream.
A vous de jouer !
A question? Need help? Contact us! We are at your disposal to support you in all stages of your project.
Experts Ibexa de longue date, forts de nombreux projets réussis sur Ibexa, eZ Publish et ...
La conférence annuelle Ibexa se tiendra les 30 et 31 janvier 2025 à Barcelone et ...
Data security, and in particular the security of user passwords, is an absolute priority for ...
2024 aura été une année riche en tempêtes, avec ses hauts et ses bas. Mais ...
To celebrate the release of Dataflow 5 for Symfony 7, here is some feedback on ...
🎯 Nous relevons le défi de lancer un grand concours : Vous faire gagner un ...
How to dynamically calculate shipping costs? The official documentation that explains how to create shipping ...
How to create a new product attribute type in Ibexa Commerce
A la recherche d'un poste de travail temporaire ou permanent ? Vous recherchez un environnement ...
Experts Ibexa de longue date, forts de nombreux projets réussis sur Ibexa, eZ Publish et ...
La conférence annuelle Ibexa se tiendra les 30 et 31 janvier 2025 à Barcelone et ...
Data security, and in particular the security of user passwords, is an absolute priority for ...
2024 aura été une année riche en tempêtes, avec ses hauts et ses bas. Mais ...
To celebrate the release of Dataflow 5 for Symfony 7, here is some feedback on ...
🎯 Nous relevons le défi de lancer un grand concours : Vous faire gagner un ...
How to dynamically calculate shipping costs? The official documentation that explains how to create shipping ...
How to create a new product attribute type in Ibexa Commerce
A la recherche d'un poste de travail temporaire ou permanent ? Vous recherchez un environnement ...