' . t('About') . ''; $output .= '
' . t('Create a filter for permission page.') . '
'; return $output; default: } } /** * Implements hook_form_alter() on behalf of permissions_filter.module. */ function permissions_filter_form_alter(&$form, FormStateInterface $form_state, $form_id) { if ($form_id == 'user_admin_permissions') { $form['filters'] = array( '#type' => 'container', '#attributes' => array( 'class' => array('table-filter', 'js-show'), ), '#weight' => -1, ); $form['filters']['search_permission'] = array( '#type' => 'search', '#title' => t('Enter a part of the Permission name or description'), '#title_display' => 'invisible', '#size' => 30, '#placeholder' => t('Filter by name or description'), '#description' => t('Enter a part of the permission'), '#attributes' => array( 'class' => array('table-filter-text'), 'data-table' => '#user-admin-permissions', 'autocomplete' => 'off', ), ); $form['#attached']['library'][] = 'permissions_filter/permissions_js'; } }