HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/fabricas.colombiatrade.com.co/web_https/modules/contrib/xmlsitemap/xmlsitemap.views.inc
<?php

/**
 * @file
 * Views integration for xmlsitemap.
 */

/**
 * Implements hook_views_data().
 */
function xmlsitemap_views_data() {
  return [
    'xmlsitemap' => [
      'table' => [
        'group' => t('XML Sitemap'),
        'provider' => 'xmlsitemap',
      ],
      'id' => [
        'title' => t('ID'),
      ],
      'type' => [
        'title' => t('Type'),
      ],
      'subtype' => [
        'title' => t('Sub-type'),
      ],
      'loc' => [
        'title' => t('URL'),
      ],
      'language' => [
        'title' => t('Language'),
      ],
      'access' => [
        'title' => t('Access'),
      ],
      'status' => [
        'title' => t('Status'),
        'filter' => [
          'id' => 'boolean',
          'label' => t('Status'),
        ],
      ],
      'status_override' => [
        'title' => t('Status Override'),
        'filter' => [
          'id' => 'boolean',
          'label' => t('Status Override'),
        ],
      ],
      'lastmod' => [
        'title' => t('Last modified'),
      ],
      'priority' => [
        'title' => t('Priority'),
      ],
      'priority_override' => [
        'title' => t('Priority Override'),
      ],
      'changefreq' => [
        'title' => t('Change Frequency'),
      ],
      'changecount' => [
        'title' => t('Change Count'),
      ],
    ],
  ];
}

/**
 * Implements hook_views_data_alter().
 */
function xmlsitemap_views_data_alter(array &$data) {
  foreach (\Drupal::entityTypeManager()->getDefinitions() as $id => $definition) {
    if (!xmlsitemap_link_entity_check_enabled($id) && !empty($data[$definition->getBaseTable()])) {
      continue;
    }
    $data[$definition->getBaseTable()]['xmlsitemap_settings'] = [
      'title' => t('XML Sitemap Settings'),
      'relationship' => [
        'id' => 'standard',
        'base' => 'xmlsitemap',
        'base field' => 'id',
        'field' => $definition->getKey('id'),
        'label' => t('XML Sitemap Settings'),
        'extra' => [
          ['field' => 'type', 'value' => $id],
        ],
      ],
    ];
  }
}