public function addRecordStartedEvent(JoinPointInterface $joinPoint)
    {
        $data = $joinPoint->getMethodArgument('data');
        $externalIdentifier = Arrays::getValueByPath($data, '__externalIdentifier');
        $title = Arrays::getValueByPath($data, '__label');
        /** @var ImporterInterface $importer */
        $importer = $joinPoint->getProxy();
        list($importerClassName) = $this->getImporterClassNames($importer);

        $data['__message'] = sprintf('%s: "%s" (%s)', $importerClassName, $title ?: '-- No label --', $externalIdentifier);
        $event = $importer->getImportService()->addEvent(sprintf('%s:Record:Started', $importerClassName), $externalIdentifier, $data);
        $importer->setCurrentEvent($event);
    }
public function addRecordStartedEvent(JoinPointInterface $joinPoint)
    {
        $data = $joinPoint->getMethodArgument('data');
        $externalIdentifier = Arrays::getValueByPath($data, '__externalIdentifier');
        $title = Arrays::getValueByPath($data, '__label');
        /** @var ImporterInterface $importer */
        $importer = $joinPoint->getProxy();
        list($importerClassName) = $this->getImporterClassNames($importer);

        $data['__message'] = sprintf('%s: "%s" (%s)', $importerClassName, $title ?: '-- No label --', $externalIdentifier);
        $event = $importer->getImportService()->addEvent(sprintf('%s:Record:Started', $importerClassName), $externalIdentifier, $data);
        $importer->setCurrentEvent($event);
    }
public function addRecordStartedEvent ( JoinPointInterface $ joinPoint ) { $ data = $ joinPoint -> getMethodArgument ( 'data' ) ; $ externalIdentifier = Arrays :: getValueByPath ( $ data , '__externalIdentifier' ) ; $ title = Arrays :: getValueByPath ( $ data , '__label' ) ; /** @var ImporterInterface $importer */ $ importer = $ joinPoint -> getProxy ( ) ; list ( $ importerClassName ) = $ this -> getImporterClassNames ( $ importer ) ; $ data [ '__message' ] = sprintf ( '%s: "%s" (%s)' , $ importerClassName , $ title ? : '-- No label --' , $ externalIdentifier ) ; $ event = $ importer -> getImportService ( ) -> addEvent ( sprintf ( '%s:Record:Started' , $ importerClassName ) , $ externalIdentifier , $ data ) ; $ importer -> setCurrentEvent ( $ event ) ; }
Add record started event

@Flow\Before("within(Ttree\ContentRepositoryImporter\Importer\ImporterInterface) && method(.*->processRecord())")
@param JoinPointInterface $joinPoint
Add record started event