You are here

linkit_panel_pages.module in Linkit panel pages 6

Same filename and directory in other branches
  1. 7.2 linkit_panel_pages.module
  2. 7 linkit_panel_pages.module

Extend Linkit with panel page links

File

linkit_panel_pages.module
View source
<?php

/**
 * @file
 * Extend Linkit with panel page links
 */

/**
 * Implementation of hook_linkit_load_plugins().
 */
function linkit_panel_pages_linkit_load_plugins($string) {
  $matches = array();

  // Get nodes
  $result = db_query_range("SELECT p.admin_title, p.path FROM {page_manager_pages} p WHERE LOWER(p.name) LIKE LOWER('%%%s%%')", $string, 0, 10);
  $i = 0;
  while ($panel = db_fetch_object($result)) {
    $matches['panel_page'][$i] = array(
      'title' => $panel->admin_title,
      'path' => base_path() . $panel->path,
      'information' => array(
        'type' => 'Panel Page',
      ),
    );
    $i++;
  }
  return $matches;
}

/**
 * Implementation of hook_linkit_info_plugins().
 * 
 * This is used by linkit_permissions
 */
function linkit_panel_pages_linkit_info_plugins() {
  $return['linkit_panel_pages'] = array(
    'type' => 'panel pages',
  );
  return $return;
}

Functions

Namesort descending Description
linkit_panel_pages_linkit_info_plugins Implementation of hook_linkit_info_plugins().
linkit_panel_pages_linkit_load_plugins Implementation of hook_linkit_load_plugins().