1. Go to this page and download the library: Download numero2/contao-tags 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/ */
numero2 / contao-tags example snippets
if( $this->tags ):
if( $this->tags ):
use Contao\ModuleEventReader;
use Contao\ModuleModel;
use Contao\System;
$moduleModel = ModuleModel::findOneById(69); // replace with the ID of your actual EventReader module
$module = new ModuleEventReader($moduleModel);
$tagListener = System::getContainer()->get('numero2_tags.listener.events');
$event = $tagListener->parseEvent($this->arrData, $module);
$this->tags = $event['tags'];
$this->tagsRaw = $event['tagsRaw'];
// src/EventListener/TagGetListListener.php
namespace App\EventListener;
use numero2\TagsBundle\Event\TagsEvents;
use numero2\TagsBundle\Event\TagsGetListEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener(TagsEvents::TAGS_GET_LIST)]
class TagGetListListener {
public function __invoke( TagsGetListEvent $event ): void {
// …
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.