ats-1.0.x-dev/ats_candidate/ats_candidate.module

ats_candidate/ats_candidate.module
<?php

/**
 * @file
 * Provides an ats candidate entity type.
 */

use Drupal\Core\Render\Element;

/**
 * Implements hook_theme().
 */
function ats_candidate_theme() {
  return [
    'ats_candidate' => [
      'render element' => 'elements',
    ],
  ];
}

/**
 * Prepares variables for ats candidate templates.
 *
 * Default template: ats-candidate.html.twig.
 *
 * @param array $variables
 *   An associative array containing:
 *   - elements: An associative array containing the ats candidate information and any
 *     fields attached to the entity.
 *   - attributes: HTML attributes for the containing element.
 */
function template_preprocess_ats_candidate(array &$variables) {
  foreach (Element::children($variables['elements']) as $key) {
    $variables['content'][$key] = $variables['elements'][$key];
  }
}

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

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