You are here

twig_extender_tests.install in Twig Extender 8

Same filename and directory in other branches
  1. 8.2 twig_extender_tests/twig_extender_tests.install

File

twig_extender_tests/twig_extender_tests.install
View source
<?php

use Drupal\node\Entity\Node;
function twig_extender_tests_install() {
  Node::create([
    'type' => 'test_twig_extender_node',
    'title' => 'Twig Extender Node 1',
    'status' => 1,
    'path' => [
      'alias' => '/test/node/1-node',
    ],
  ])
    ->save();
  Node::create([
    'type' => 'test_twig_extender_node',
    'title' => 'Twig Extender Node 2',
    'status' => 1,
    'path' => [
      'alias' => '/test/node/2-node',
    ],
  ])
    ->save();
}

Functions