Italian (Italy)

apply_filters( 'vikappointments_after_save_employee', bool $status, array $data, bool $isNew, JTable $table )

Fires after saving an employee.


Description

This hook is triggered after creating or updating an employee record.


Parameters

$status

(bool)  True on success, false otherwise.

$data

(array)  The properties of the employee that have been saved.

$isNew

(bool)  True in case the employee has been created, false in case an existing employee was updated.

$table

(JTable)  The table instance that handles the saving process.


Example

/**
 * Trigger hook to allow the plugins to make something after
 * saving an employee.
 *
 * @param  boolean  $status  True on success, false otherwise.
 * @param  mixed    $data    The saved record.
 * @param  boolean  $isNew   True if new, false in case of update.
 * @param  JTable   $table   The table instance.
 */
add_filter('vikappointments_after_save_employee', function($status, $data, $isNew, $table)
{
    /**
     * @todo do something after saving an employee
     */

    return $status;
}, 10, 4);

Changelog

Version Description
1.2.0 Added $table argument.
1.1.3 Introduced.
Ultimo aggiornamento: 2021-10-05
Utile?
Potrebbe interessarti: