linkit_panel_pages.module in Linkit panel pages 7
Same filename and directory in other branches
Extend Linkit with panel page links
File
linkit_panel_pages.moduleView 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();
$results = array();
// Get panel page urls
$results = db_select('page_manager_pages', 'pmp')
->fields('pmp', array(
'admin_title',
'path',
))
->condition('pmp.name', '%' . db_like($string) . '%', 'LIKE')
->execute();
foreach ($results as $panel) {
$matches['panel_pages'][] = array(
'title' => $panel->admin_title,
'path' => base_path() . $panel->path,
'information' => array(
'type' => 'Panel Page',
),
);
}
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
Name | 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(). |