Italian (Italy)

apply_filters_ref_array( 'vikappointments_build_services_list_data', bool $status, array &$groupsJModelVAP $model )

Fires before returning the array of services.


Description

Trigger hook to manipulate at runtime the response of the query used to load the services to display, under the Services List page.

Third party plugins can alter the resulting list of services (and groups).


Parameters

$status

(bool)  True on success, false otherwise.

&$groups

(array)  An array of groups, which contain an array of services each.

$model

(JModelVAP)  The model responsible of loading the data needed to the Services List page.


Example

The example below uses a default title for those items that do not belong to a group.

/**
 * Trigger hook to manipulate the query response at runtime. Third party
 * plugins can alter the resulting list of services (and groups).
 *
 * @param  boolean    $status   True on success, false otherwise.
 * @param  array      &$groups  An array of groups and services.
 * @param  JModelVAP  $model    The view model.
 */
add_filter('vikappointments_build_services_list_data', function($status, &$groups, $model)
{
    // make sure the slot holding the services w/o a group exists
    if (isset($groups[0]))
    {
        // use a default title
        $groups[0]->name = __('Uncategorized', 'my-plugin');
    }

    return true;
}, 10, 3);

Changelog

Version Description
1.2 Introduced.
Ultimo aggiornamento: 2021-07-30
Utile?
Potrebbe interessarti:

Questo sito web utilizza i cookie

Questo sito web utilizza cookie e tecnologie simili. Alcune di queste tecnologie sono necessarie per il corretto funzionamento del sito web (essenziali). Altre tecnologie sono utilizzate per valutare il comportamento degli utenti (analisi), per integrare media esterni o per scopi pubblicitari. Se l'utente accetta, queste tecnologie vengono attivate. I dettagli sono riportati nella Privacy Policy. Da questa stessa pagina è inoltre possibile aggiornare/revocare il consenso. Se non si fornisce il consenso, verranno attivati solo i cookie con funzioni essenziali.

Sul nostro sito web utilizziamo tecnologie provenienti dagli Stati Uniti. Pertanto, se acconsentite, acconsentite anche al trasferimento dei vostri dati negli Stati Uniti. Desideriamo sottolineare che gli Stati Uniti non hanno un livello di protezione dei dati paragonabile a quello dell'Unione Europea e che qualsiasi azienda statunitense può essere obbligata dalle autorità statali a consegnare i vostri dati senza che voi abbiate alcuno strumento efficace di protezione legale contro questo.