public function TransactionInterface::setTargetEntity in Transaction 8
Sets the transaction's target entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The target content entity.
Return value
\Drupal\transaction\TransactionInterface The called transaction entity.
Throws
\InvalidArgumentException If the type of the given entity is not valid for the transaction type.
1 method overrides TransactionInterface::setTargetEntity()
- Transaction::setTargetEntity in src/
Entity/ Transaction.php - Sets the transaction's target entity.
File
- src/
TransactionInterface.php, line 134
Class
- TransactionInterface
- The interface for transaction entities.
Namespace
Drupal\transactionCode
public function setTargetEntity(ContentEntityInterface $entity);