You are here

class LinkitPanelPagesPlugin in Linkit panel pages 7.2

Plugin class.

Hierarchy

Expanded class hierarchy of LinkitPanelPagesPlugin

1 string reference to 'LinkitPanelPagesPlugin'
linkt_panel_pages.inc in plugins/linkit_plugins/linkt_panel_pages.inc

File

plugins/linkit_plugins/linkt_panel_pages.class.php, line 7

View source
class LinkitPanelPagesPlugin extends LinkitPlugin {

  /**
   * The autocomplete callback function for the Linkit Entity plugin.
   */
  function autocomplete_callback() {
    $matches = array();

    // Get page urls.
    $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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LinkitPanelPagesPlugin::autocomplete_callback function The autocomplete callback function for the Linkit Entity plugin. Overrides LinkitPluginInterface::autocomplete_callback
LinkitPlugin::broken function Determine if the handler is considered 'broken', meaning it's a a placeholder used when a handler can't be found. 1
LinkitPlugin::buildDescription function Build the search row description. 1
LinkitPlugin::buildGroup function Returns a string to use as the search result group name. 1
LinkitPlugin::buildLabel function Build the label that will be used in the search result for each row. 1
LinkitPlugin::buildPath function Build an URL based in the path and the options. 1
LinkitPlugin::buildRowClass function Returns a string with CSS classes that will be added to the search result row for this item. 1
LinkitPlugin::buildSettingsForm function Generate a settings form for this handler. Uses the standard Drupal FAPI. 1
LinkitPlugin::setSearchString function Set the search string.
LinkitPlugin::ui_description function Return a string representing this handler's description in the UI. 2
LinkitPlugin::ui_title function Return a string representing this handler's name in the UI. 2
LinkitPlugin::__construct function Initialize this plugin with the plugin and the profile. 1