You are here

class TamperItem in Tamper 8

Defines a single tamper item class.

Hierarchy

Expanded class hierarchy of TamperItem

1 file declares its use of TamperItem
CopyTest.php in tests/src/Unit/Plugin/Tamper/CopyTest.php

File

src/TamperItem.php, line 10

Namespace

Drupal\tamper
View source
class TamperItem implements TamperableItemInterface {

  /**
   * {@inheritdoc}
   */
  public function getSource() {
    return get_object_vars($this);
  }

  /**
   * {@inheritdoc}
   */
  public function getSourceProperty($property) {
    return isset($this->{$property}) ? $this->{$property} : NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function setSourceProperty($property, $data) {
    $this->{$property} = $data;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TamperItem::getSource public function Returns the whole item as an array. Overrides TamperableItemInterface::getSource
TamperItem::getSourceProperty public function Retrieves a source property. Overrides TamperableItemInterface::getSourceProperty
TamperItem::setSourceProperty public function Sets a source property. Overrides TamperableItemInterface::setSourceProperty