Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 307... Línea 307...
307
     * Returns the attributes to place on a contact button.
307
     * Returns the attributes to place on a contact button.
308
     *
308
     *
309
     * @param object $user User object.
309
     * @param object $user User object.
310
     * @param bool $iscontact
310
     * @param bool $iscontact
311
     * @param bool $displaytextlabel Instructs whether to display a text label.
311
     * @param bool $displaytextlabel Instructs whether to display a text label.
-
 
312
     * @param bool $isrequested Whether the contact request is sent or not.
312
     * @return array
313
     * @return array
313
     */
314
     */
314
    public static function togglecontact_link_params($user, $iscontact = false, bool $displaytextlabel = true) {
315
    public static function togglecontact_link_params(
-
 
316
        $user,
-
 
317
        $iscontact = false,
-
 
318
        bool $displaytextlabel = true,
-
 
319
        bool $isrequested = false,
-
 
320
    ) {
315
        global $USER;
321
        global $USER;
316
        $params = array(
322
        $params = array(
317
            'data-currentuserid' => $USER->id,
323
            'data-currentuserid' => $USER->id,
318
            'data-userid' => $user->id,
324
            'data-userid' => $user->id,
319
            'data-is-contact' => $iscontact,
325
            'data-is-contact' => $iscontact,
-
 
326
            'data-is-requested' => $isrequested,
320
            'data-display-text-label' => $displaytextlabel,
327
            'data-display-text-label' => $displaytextlabel,
321
            'id' => 'toggle-contact-button',
328
            'id' => 'toggle-contact-button',
322
            'role' => 'button',
329
            'role' => 'button',
323
            'class' => 'ajax-contact-button',
330
            'class' => 'ajax-contact-button',
324
        );
331
        );