You are here

function paragraphs_collection_demo_install in Paragraphs Collection 8

Implements hook_install().

File

modules/paragraphs_collection_demo/paragraphs_collection_demo.install, line 21
Installation hooks for paragraphs_collection_demo module.

Code

function paragraphs_collection_demo_install() {
  _paragraphs_collection_demo_add_background_plugin_field();

  // Create and set the demo content on the front page.
  $node = _paragraphs_collection_demo_create_demo_article();
  \Drupal::configFactory()
    ->getEditable('system.site')
    ->set('page.front', '/node/' . $node
    ->id())
    ->save();
  _paragraphs_collection_demo_create_demo_article_1();
  _paragraphs_collection_demo_create_grid_article();
}