<?php
/**
 * @brief		Node Listener
 * @author		<a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
 * @copyright	(c) Invision Power Services, Inc.
 * @license		https://www.invisioncommunity.com/legal/standards/
 * @package		Invision Community
{subpackage}
 * @since		{date}
 */

namespace IPS\{app}\listeners;

/* To prevent PHP errors (extending class does not exist) revealing path */

use IPS\Events\ListenerType\NodeListenerType;
use IPS\Node\Model;
use function defined;

if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
	header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0') . ' 403 Forbidden');
	exit;
}

/**
 * Node Listener
 */
class {filename} extends NodeListenerType
{
 	/**
 	 * @brief	[Required] The class that is handled by this listener
 	 * @var string
 	 */
 	public static string $class = {class};

    /**
     * Fired when the node is initialized (in constructFromData).
     * Useful for loading additional tables or properties
     *
     * @param Model $node
     * @return void
     */
    public function onLoad( Model $node ) : void
    {

    }

    /**
     * Fired when a node is deleted
     *
     * @param Model $node
     * @return void
     */
    public function onDelete( Model $node ) : void
    {

    }
}