* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Grid\Position; /** * Class PositionModification contains the modification for a * designated row. */ final class PositionModification implements PositionModificationInterface { /** * @var string|int */ private $id; /** * @var int */ private $oldPosition; /** * @var int */ private $newPosition; /** * @param string|int $id * @param int $oldPosition * @param int $newPosition */ public function __construct( $id, $oldPosition, $newPosition ) { $this->id = $id; $this->oldPosition = $oldPosition; $this->newPosition = $newPosition; } /** * {@inheritdoc} */ public function getId() { return $this->id; } /** * {@inheritdoc} */ public function getOldPosition() { return $this->oldPosition; } /** * {@inheritdoc} */ public function getNewPosition() { return $this->newPosition; } }