public static function Nodes::canExport in Hook Update Deploy Tools 7
Checks to see if nodes can be exported.
Return value
bool TRUE if can be exported.
Overrides ExportInterface::canExport
1 call to Nodes::canExport()
- Nodes::export in src/
Nodes.php - Exports a single Node based on its nid. (Typically called from Drush).
File
- src/
Nodes.php, line 107
Class
- Nodes
- Public method for changing nodes programatically.
Namespace
HookUpdateDeployToolsCode
public static function canExport() {
// Uses drupal_var_export which needs to be included.
$file = DRUPAL_ROOT . '/includes/utility.inc';
require_once $file;
// This relies on clean urls.
$clean_urls = variable_get('clean_url', FALSE);
if ($clean_urls) {
return TRUE;
}
else {
$message = "Node export to a file, requires clean URLs, which are not enabled. Please enable Clean URLs.";
throw new HudtException($message, array(), WATCHDOG_ERROR, TRUE);
}
}