Skip to content

numero2/contao-personio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contao Personio Bundle

About

Import job advertisements from Personio as news into Contao.

System requirements

Installation

  • Install via Contao Manager or Composer (composer require numero2/contao-personio-bundle)
  • Run a database update via the Contao-Installtool or using the contao:migrate command.

Events

By default the bundle only imports certain information from Personio that can be matches to the structure of Contao's news. If you need more data you can import them on your own using the personio_import_advertisement event.

Important

This example shows how to import additional job information from Personio.
Note: You must first define any custom fields in your own contao/dca/tl_news.php as they are not part of Contao's core.

// src/EventListener/PersonioParseListener.php
namespace App\EventListener;

use numero2\PersonioBundle\API\PersonioCatalogTypes;
use numero2\PersonioBundle\Event\PersonioEvents;
use numero2\PersonioBundle\Event\PersonioParseEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;


#[AsEventListener(PersonioEvents::IMPORT_ADVERTISEMENT)]
class PersonioParseListener {

    public function __invoke( PersonioParseEvent $event ): void {

        $position = $event->getPosition();
        $news = $event->getNews();
        $isUpdate = $event->isUpdate();

        // add some additional data
        $news->job_name = $position->name??'';
        $news->job_schedule = $position->schedule??'';
        $news->job_office = $position->office??'';
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages