You are here

private function InstapageCmsPluginDrupal8Connector::getPostSlugs in Instapage plugin 8.3

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

Gets the list of slugs used by Drupal 8 posts.

Return value

array List of slugs used by posts.

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

File

core/connectors/InstapageCmsPluginDrupal8Connector.php, line 761

Class

InstapageCmsPluginDrupal8Connector
Class that utilizes native Drupal 8 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;
}