linkt_panel_pages.class.php in Linkit panel pages 7.2
File
plugins/linkit_plugins/linkt_panel_pages.class.php
View source
<?php
class LinkitPanelPagesPlugin extends LinkitPlugin {
function autocomplete_callback() {
$matches = array();
$results = db_select('page_manager_pages', 'pmp')
->fields('pmp', array(
'admin_title',
'path',
))
->condition('pmp.name', '%' . db_like($this->serach_string) . '%', 'LIKE')
->execute();
foreach ($results as $page) {
$matches[] = array(
'title' => $this
->buildLabel($page->admin_title),
'path' => $this
->buildPath($page->path),
'group' => $this
->buildGroup('Pages'),
);
}
return $matches;
}
}