PHP code example of inspiredminds / contao-personio
1. Go to this page and download the library: Download inspiredminds/contao-personio 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/ */
inspiredminds / contao-personio example snippets
// src/EventListener/ModifyApplicationFormListener.php
namespace App\EventListener;
use Codefog\HasteBundle\Util\ArrayPosition;
use InspiredMinds\ContaoPersonio\Event\ModifyApplicationFormEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener]
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'),
)
;
}
}