function gathercontent_import_pages in GatherContent 7
Import wizard step 3: Import pages.
1 string reference to 'gathercontent_import_pages'
- gathercontent_import in ./
gathercontent.module - Import wizard, built with CTools multistep form wizard.
File
- ./
gathercontent.module, line 261 - Imports pages from GatherContent (http://gathercontent.com/) into Drupal as nodes.
Code
function gathercontent_import_pages($form, &$form_state) {
$project_id = variable_get('gathercontent_project_id');
$pages = GatherContentPages::getPages($project_id);
// Build table header.
$header = array(
'title' => t('Page title'),
);
$options = array();
$rows = GatherContentPages::pageImportForm($pages, $options);
$form['#prefix'] = '<p>' . t("Select the page(s) you want to import. Then, click the 'Import pages' button at the bottom of this page.") . '</p>';
$form['pages_list'] = array(
'#type' => 'tableselect',
'#header' => $header,
'#options' => $rows,
'#empty' => t('No pages found.'),
);
return $form;
}