PHP code example of heimrichhannot / contao-advanced-dashboard-bundle
1. Go to this page and download the library: Download heimrichhannot/contao-advanced-dashboard-bundle 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/ */
heimrichhannot / contao-advanced-dashboard-bundle example snippets
declare(strict_types=1);
namespace App\EventListener;
use HeimrichHannot\AdvancedDashboardBundle\Event\VersionListFilterEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
class AdvancedDashboardFilterListener
{
#[AsEventListener]
public function onVersionListFilter(VersionListFilterEvent $event): void
{
$event->queryBuilder
->addSelect('memberId')
->andWhere('fromTable != :advancedDashboardExcludedTable')
->setParameter('advancedDashboardExcludedTable', 'tl_internal_record')
;
}
}
declare(strict_types=1);
namespace App\EventListener;
use HeimrichHannot\AdvancedDashboardBundle\Event\VersionListRowEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
class AdvancedDashboardListener
{
#[AsEventListener]
public function onVersionListRow(VersionListRowEvent $event): void
{
$event->row['description'] = strtoupper((string) $event->row['description']);
}
}