function taxonomy_edge_cronapi in Taxonomy Edge 8
Same name and namespace in other branches
- 6 taxonomy_edge.module \taxonomy_edge_cronapi()
- 7 taxonomy_edge.module \taxonomy_edge_cronapi()
Implements hook_cronapi(). Regularly rebuild the edge list
File
- ./
taxonomy_edge.module, line 169 - Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.
Code
function taxonomy_edge_cronapi($op, $job = NULL) {
switch ($op) {
case 'list':
return array(
'taxonomy_edge_cron_rebuild' => 'Rebuild taxonomy edges',
'taxonomy_edge_cron' => 'Resort invalid trees',
);
case 'rule':
switch ($job) {
case 'taxonomy_edge_cron_rebuild':
return '0 2 * * *';
case 'taxonomy_edge_cron':
return '* * * * *';
}
case 'settings':
switch ($job) {
case 'taxonomy_edge_cron_rebuild':
return array(
'enabled' => FALSE,
);
case 'taxonomy_edge_cron':
return array(
'enabled' => TRUE,
);
}
}
}