You are here

function pardot_webform_enabled_pardot_load in Pardot Integration 7

Same name and namespace in other branches
  1. 7.2 pardot_webform/pardot_webform.module \pardot_webform_enabled_pardot_load()

Loads all webform enabled nodes with Pardot post URL.

Return value

object|FALSE Settings object or false on failure.

1 string reference to 'pardot_webform_enabled_pardot_load'
pardot_menu in ./pardot.module
Implements hook_menu().

File

./pardot.module, line 510
Pardot integration module.

Code

function pardot_webform_enabled_pardot_load() {
  $results = db_query("SELECT * FROM {pardot_webform}");
  $header = array(
    t('Node'),
    t('Edit Post URL'),
    t('URL'),
    t('Active'),
  );
  $rows = array();
  foreach ($results as $result) {
    $node = node_load($result->nid);
    $rows[] = array(
      l($node->title, "node/{$result->nid}"),
      l(t('Edit'), "node/{$result->nid}/webform/pardot"),
      $result->url,
      $result->is_active,
    );
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}