You are here

SubjectInterface.php in Changed Fields API 8

File

src/SubjectInterface.php
View source
<?php

/**
 * @file
 * Contains SubjectInterface.php.
 */
namespace Drupal\changed_fields;

use Drupal\node\NodeInterface;

/**
 * Interface SubjectInterface.
 */
interface SubjectInterface {

  /**
   * Add observer to list.
   *
   * @param ObserverInterface $observer
   */
  public function addObserver(ObserverInterface $observer);

  /**
   * Remove observer from list.
   *
   * @param ObserverInterface $observer
   */
  public function removeObserver(ObserverInterface $observer);

  /**
   *  Notify all registered observers if needed.
   *
   * @param NodeInterface $node
   */
  public function checkNodeFields(NodeInterface $node);

  /**
   * Returns node object.
   */
  public function getNode();

  /**
   * Returns changed fields.
   */
  public function getChangedFields();

}

Interfaces

Namesort descending Description
SubjectInterface Interface SubjectInterface.