farm-2.x-dev/modules/asset/structure/farm_structure.post_update.php

modules/asset/structure/farm_structure.post_update.php
<?php

/**
 * @file
 * Post update hooks for the farm_structure module.
 */

use Drupal\farm_structure\Entity\FarmStructureType;

/**
 * Add "Other" structure type configuration.
 */
function farm_structure_post_update_add_other_structure_type(&$sandbox) {
  $type = FarmStructureType::create([
    'id' => 'other',
    'label' => 'Other',
    'dependencies' => [
      'enforced' => [
        'module' => [
          'farm_structure',
        ],
      ],
    ],
  ]);
  $type->save();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc