function tft_archive_is_archive_folder in Taxonomy File Tree 7.2
Checks if the term is an "Archive" term.
Parameters
int $tid:
Return value
bool
3 calls to tft_archive_is_archive_folder()
- tft_archive_get_closest_parent_archive_tid in modules/
tft_archive/ tft_archive.module - Helper function to get the closest archive folder.
- tft_archive_term_form in modules/
tft_archive/ includes/ tft_archive.pages.inc - Form callback: archive a term form.
- tft_archive_tft_item_operation_links_alter in modules/
tft_archive/ tft_archive.module - Implements hook_tft_item_operation_links_alter().
File
- modules/
tft_archive/ tft_archive.module, line 261 - Hook implementation and logic.
Code
function tft_archive_is_archive_folder($tid) {
$result = db_select('tft_archive_tid', 't')
->fields('t', array(
'is_archive',
))
->condition('tid', $tid)
->execute()
->fetchField();
return !empty($result);
}