public function SupportTicket::postSave in Support Ticketing System 8
Acts on a saved entity before the insert or update hook is invoked.
Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
bool $update: TRUE if the entity has been updated, or FALSE if it has been inserted.
Overrides ContentEntityBase::postSave
File
- modules/
support_ticket/ src/ Entity/ SupportTicket.php, line 109 - Contains \Drupal\support_ticket\Entity\SupportTicket.
Class
- SupportTicket
- Defines the support ticket entity class.
Namespace
Drupal\support_ticket\EntityCode
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
parent::postSave($storage, $update);
// Reindex the support_ticket when it is updated. The support_ticket is
// automatically indexed when it is added, simply by being added to the
// support_ticket table.
if ($update) {
// @todo
// support_ticket_reindex_support_ticket_search($this->id());
}
}