You are here

class FileSavedEvent in Tome 8

Allows modules to react to a file save.

Hierarchy

  • class \Drupal\tome_static\Event\FileSavedEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of FileSavedEvent

2 files declare their use of FileSavedEvent
FileSavedEventTest.php in modules/tome_static/tests/src/Kernel/FileSavedEventTest.php
StaticGenerator.php in modules/tome_static/src/StaticGenerator.php

File

modules/tome_static/src/Event/FileSavedEvent.php, line 10

Namespace

Drupal\tome_static\Event
View source
class FileSavedEvent extends Event {

  /**
   * The path to the saved file.
   *
   * @var string
   */
  protected $path;

  /**
   * Constructs a FileSavedEvent object.
   *
   * @param string $path
   *   A path.
   */
  public function __construct($path) {
    $this->path = $path;
  }

  /**
   * Gets the path to the saved file.
   *
   * @return string
   *   The path.
   */
  public function getPath() {
    return $this->path;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileSavedEvent::$path protected property The path to the saved file.
FileSavedEvent::getPath public function Gets the path to the saved file.
FileSavedEvent::__construct public function Constructs a FileSavedEvent object.