You are here

private function InstapageCmsPluginDrupal7Connector::getPostSlugs in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginDrupal7Connector.php \InstapageCmsPluginDrupal7Connector::getPostSlugs()

Gets the list of slugs used by Drupal 7 posts.

Return value

array List of slugs used by posts.

1 call to InstapageCmsPluginDrupal7Connector::getPostSlugs()
InstapageCmsPluginDrupal7Connector::getProhibitedSlugs in core/connectors/InstapageCmsPluginDrupal7Connector.php
get list of slugs that can't be used to publish a landing page.

File

core/connectors/InstapageCmsPluginDrupal7Connector.php, line 879

Class

InstapageCmsPluginDrupal7Connector
Class that utilizes native Drupal 7 functions to perform actions like remote requests and DB operations.

Code

private function getPostSlugs() {
  $editUrl = $this
    ->getSiteURL();
  $dbPrefix = $this
    ->getDBPrefix();
  $sql = 'SELECT pid AS id, SUBSTRING(alias, 2) AS slug, CONCAT(\'' . $editUrl . '\', source, \'/edit\') AS editUrl FROM ' . $dbPrefix . 'url_alias';
  $results = $this
    ->getResults($sql);
  return $results;
}