public function SupportTicketStorage::updateType in Support Ticketing System 8
Updates all support tickets of one type to be of another type.
Parameters
string $old_type: The current support ticket type of the support tickets.
string $new_type: The new support ticket type of the support tickets.
Return value
int The number of support tickets whose support ticket type field was modified.
Overrides SupportTicketStorageInterface::updateType
File
- modules/
support_ticket/ src/ SupportTicketStorage.php, line 52 - Contains \Drupal\support_ticket\SupportTicketStorage.
Class
- SupportTicketStorage
- Defines the controller class for support tickets.
Namespace
Drupal\support_ticketCode
public function updateType($old_type, $new_type) {
return $this->database
->update('support_ticket')
->fields(array(
'support_ticket_type' => $new_type,
))
->condition('support_ticket_type', $old_type)
->execute();
}