function faq_uninstall in Frequently Asked Questions 8
Same name and namespace in other branches
- 5.2 faq.install \faq_uninstall()
- 5 faq.install \faq_uninstall()
- 6 faq.install \faq_uninstall()
- 7 faq.install \faq_uninstall()
File
- ./
faq.install, line 54 - FAQ module install file.
Code
function faq_uninstall() {
$info = NodeType::load('faq');
if ($info) {
$info
->delete();
field_purge_batch(500);
$nids = \Drupal::entityQuery('node')
->condition('type', 'faq')
->execute();
foreach ($nids as $nid) {
$faqNode = Node::load($nid);
$faqNode
->delete();
}
}
}