1. YoureCom
    1. About me
  2. YoureCom Insights
  3. Work Place
  4. Support
  5. GitHub
  6. Pulse
  • Login
  • Register
  • Cart
  • Search
Workplace
  • Everywhere
  • Workplace
  • Workplace
  • Articles
  • Pages
  • Tasks
  • Products
  • More Options
  1. YoureCom – Custom Software Solutions
  2. Workplace
  3. Workplace

Revision of own events #169

  • Marcel Beckers
  • January 15, 2023 at 12:49 PM
  • 0 Comments
  • Done Done on: March 7, 2025 at 7:50 AM
✔ Done

Events should be adjusted

Bislang:

Code
$parameters = [
    'value' => \random_int(1, 1024),
];

EventHandler::getInstance()->fireAction($this, 'valueAvailable', $parameters);
PHP
<?php

namespace wcf\system\event\listener;

use wcf\form\ValueForm;

final class ValueDumpListener implements IParameterizedEventListener
{
    /**
     * @inheritDoc
     * @param ValueForm $eventObj
     */
    public function execute($eventObj, $className, $eventName, array &$parameters)
    {
        var_dump($parameters['value']);
    }
}
Display More

Absofort

Code
EventHandler::getInstance()->fire(new ValueAvailable(\random_int(1, 1024)));
PHP
<?php

namespace wcf\system\foo\event;

use wcf\system\event\IEvent;

final class ValueAvailable implements IEvent
{
    /**
     * @var int
     */
    private $value;

    public function __construct(int $value)
    {
        $this->value = $value;
    }

    public function getValue(): int
    {
        return $this->value;
    }
}
Display More

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login

Ready to make your community smarter?

Whether you need a ready-made product or a custom software solution – see for yourself.

Buy Now Try the Demo

Over 4,978 satisfied customers • Direct support from the developer

Category Responsible

  • Marcel Beckers

    Administrator

Last completed Tasks

  1. Dialog lässt sich nicht schließen und es wird nicht der richtige Kauf ausgewählt YoureCom Shop

    Shalin Done on April 13, 2026 at 3:56 PM
  2. Wero als Zahlungsmittel Shop

    Wombat Done on August 9, 2026 at 10:22 AM
  3. Clan Foren funktionieren nicht. Clan Verwaltung Clan Verwaltung: Foren

    Vakarian Done on August 9, 2026 at 10:15 AM
  4. 6.2.11 Beta 16 | Clan-Vorschau legt sich auf der Clan-Übersichtsseite über den Clan -> Klick nicht möglich Clan Verwaltung

    doerek Done on August 9, 2026 at 9:34 AM
  5. 6.2.11 Beta 16 | Reihenfolge wird beim Bearbeiten "Feldern" nicht richtig angezeigt Clan Verwaltung

    doerek Done on August 8, 2026 at 5:51 PM
  6. Fehlende Sprachvariablen Clan Verwaltung

    wik Done on August 8, 2026 at 5:33 PM
YoureCom – Custom Software Solutions

YoureCom – Over 20 Years of Professional Software Solutions.

Custom software solutions for communities, associations, and businesses — from Wuppertal to customers around the world.

Products

  • Pulse
  • Workplace
  • Clan Management
  • Competitions
  • Shop
  • MultiHunter

Company

  • About
  • Contact
  • YoureCom Insights
  • GitHub

Legal

  • Privacy Policy
  • Legal Notice
  • Terms & Conditions
  • Cancel Contract
  • Right of Withdrawal
© 2026 YoureCom · Marcel Beckers