public static function Nodes::canImport in Hook Update Deploy Tools 7
Verifies that that import can be used based on available module.
Return value
bool TRUE If the import can be run.
Throws
\DrupalUpdateException if it can not be run.
Overrides ImportInterface::canImport
1 call to Nodes::canImport()
- Nodes::import in src/
Nodes.php - Performs the unique steps necessary to import node items from export files.
File
- src/
Nodes.php, line 89
Class
- Nodes
- Public method for changing nodes programatically.
Namespace
HookUpdateDeployToolsCode
public static function canImport() {
// This relies on clean urls.
$clean_urls = variable_get('clean_url', FALSE);
if ($clean_urls) {
return TRUE;
}
else {
$message = "Node import from file, requires clean URLs, which are not enabled. Please enable Clean URLs.";
throw new HudtException($message, array(), WATCHDOG_ERROR, TRUE);
}
}