You are here

speedboxes.module in Speedboxes - Fast checkbox handling 8

Same filename and directory in other branches
  1. 7 speedboxes.module

File

speedboxes.module
View source
<?php

/**
 * @file
 * Contains hook implementations for speedboxes module.
 */
declare (strict_types=1);
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function speedboxes_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the speedboxes module.
    case 'help.page.speedboxes':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Allows for the checking and unchecking of multiple checkboxes with a drag and drop interface.') . '</p>';
      return $output;
    default:
  }
}

/**
 * Implements hook_form_FORM_ID_alter() for 'user_admin_permissions'.
 */
function speedboxes_form_user_admin_permissions_alter(&$form, FormStateInterface $form_state) {
  $form['#attached']['library'][] = 'speedboxes/speedboxes';
}

/**
 * Implements hook_form_FORM_ID_alter() for 'group_admin_permissions'.
 */
function speedboxes_form_group_admin_permissions_alter(&$form, FormStateInterface $form_state) {
  $form['#attached']['library'][] = 'speedboxes/speedboxes';
}

Functions

Namesort descending Description
speedboxes_form_group_admin_permissions_alter Implements hook_form_FORM_ID_alter() for 'group_admin_permissions'.
speedboxes_form_user_admin_permissions_alter Implements hook_form_FORM_ID_alter() for 'user_admin_permissions'.
speedboxes_help Implements hook_help().