mirror of
https://git.northern.co/onpoint-suite/drupal_yp_install_profile.git
synced 2024-10-31 17:05:32 +00:00
26 lines
491 B
Plaintext
26 lines
491 B
Plaintext
<?php
|
|
/**
|
|
* @file
|
|
* Install, update and uninstall functions for the yp_install_profile install profile.
|
|
*/
|
|
|
|
use \Drupal\node\Entity\Node;
|
|
|
|
/**
|
|
* Implements hook_install().
|
|
*
|
|
* Perform actions to set up the site for this profile.
|
|
*
|
|
* @see system_install()
|
|
*/
|
|
function yp_install_profile_install() {
|
|
// Can add code in here to make nodes, terms, etc.
|
|
|
|
// Create homepage node.
|
|
$node = Node::create([
|
|
'type' => 'homepage',
|
|
'title' => 'Homepage',
|
|
]);
|
|
$node->save();
|
|
}
|