You are here

function search_by_page_install in Search by Page 8

Same name and namespace in other branches
  1. 6 search_by_page.install \search_by_page_install()
  2. 7 search_by_page.install \search_by_page_install()

Makes sure that the body field is added to our content types.

File

./search_by_page.install, line 145
Install hooks for search_by_page module.

Code

function search_by_page_install() {

  // node_types_build();
  // D7 -> D8 conversion of $types = node_type_get_types();
  $types = \Drupal\node\Entity\NodeType::loadMultiple();
  node_add_body_field($types['search_by_page_indexed']);
  node_add_body_field($types['search_by_page_hidden']);
}