inspiredminds / contao-personio
Personio API connection for Contao.
Fund package maintenance!
fritzmg
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: >=8.1
- codefog/contao-haste: ^5.2
- contao/core-bundle: ^4.13 || ^5.0
- phpdocumentor/reflection-docblock: ^5.3
- symfony/dependency-injection: ^5.4 || ^6.4 || ^7.1
- symfony/event-dispatcher: ^5.4 || ^6.4 || ^7.1
- symfony/event-dispatcher-contracts: ^2.0 || ^3.0
- symfony/filesystem: ^5.4 || ^6.4 || ^7.1
- symfony/framework-bundle: ^5.4 || ^6.4 || ^7.1
- symfony/http-client: ^5.4 || ^6.4 || ^7.1
- symfony/http-client-contracts: ^2.0 || ^3.0
- symfony/http-foundation: ^5.4 || ^6.4 || ^7.1
- symfony/http-kernel: ^5.4 || ^6.4 || ^7.1
- symfony/messenger: ^5.4 || ^6.4 || ^7.1
- symfony/mime: ^5.4 || ^6.4 || ^7.1
- symfony/property-access: ^5.4 || ^6.4 || ^7.1
- symfony/property-info: ^5.4 || ^6.4 || ^7.1
- symfony/serializer: ^5.4 || ^6.4 || ^7.1
- terminal42/contao-fineuploader: ^3.4
Requires (Dev)
- contao/easy-coding-standard: ^6.0
- contao/rector: ^1.0
README
Contao Personio
Personio API connection for Contao.
Configuration
For the job listings you first need to configure the public XML feed of the company's job listings:
# config/config.yaml contao_personio: xml_feed: https://{YOUR_COMPANY}.jobs.personio.de/xml
For the Recruiting API you will need to define the Company ID and the Recruiting API token:
# config/config.yaml contao_personio: company_id: 123456 recruiting_api_token: your-token
It is recommended to store the token as an environment variable:
# .env
PERSONIO_RECRUITING_API_TOKEN=
# .env.local
PERSONIO_RECRUITING_API_TOKEN=your-token
# config/config.yaml contao_personio: recruiting_api_token: '%env(PERSONIO_RECRUITING_API_TOKEN)%'
Job List
The Personio jobs content elements lists all available jobs. Within the content element you can set a redirect page for the details of the job. This redirect page must be a page of the type Personio job (see below).
Job Reader
The Personio job content element acts as the reader output for the details of a job. For it work, it needs to be placed within a page of the type Personio job.
Application Form
The application form can be placed either alongside the Personio job reader content element, or on its own page. In both cases the type of the page needs to be Personio job. If you place the form on a separate page, you can define a redirect page in the Personio job content element, so that it automatically generates a link to the application form.
The application form can either be generated through the dedicated Personio job application content element, or a form from the Contao Form Generator.
Content Element
In order to get additional form fields for your custom Personio attributes into the application form, you can use the
ModifyApplicationFormListener
event:
// src/EventListener/ModifyApplicationFormListener.php namespace App\EventListener; use Codefog\HasteBundle\Util\ArrayPosition; use InspiredMinds\ContaoPersonio\Event\ModifyApplicationFormEvent; class ModifyApplicationFormListener { public function __invoke(ModifyApplicationFormEvent $event): void { $event->getForm() ->addFormField( 'custom_attribute_123', [ 'label' => 'Custom attribute', 'inputType' => 'text', 'eval' => ['maxlength' => 255], ], ArrayPosition::after('email'), ) ; } }
The name of the field must match the internal name of the custom attribute.
Form Generator
Instead of using the Personio job application content element you can also create your own form in the Contao Form Generator and activate the Store in Personio setting. Within the form you can then add the form fields you need. The names of the fields must match the names of the fields in the API. For file uploads the field name must match the category of the file in the API.
Also keep in mind that the fields first_name
, last_name
and email
are mandatory in the Personio API.
Acknowledgements
Development funded by Helmig + Weber Steuerberater.