You are here

function auto_entitylabel_features_pipe_node_alter in Automatic Entity Label 7

Implements hook_features_pipe_node_alter().

Adds auto_entitylabel_* variables when exporting node types to features.

@todo Generalize for other entity types.

File

./auto_entitylabel.module, line 519
Allows hiding of entity label fields and automatic label creation.

Code

function auto_entitylabel_features_pipe_node_alter(&$pipe, $data, $export) {
  if (!empty($data)) {
    $variables = array(
      'auto_entitylabel_node',
      'auto_entitylabel_pattern_node',
      'auto_entitylabel_php_node',
    );
    foreach ($data as $node_type) {
      foreach ($variables as $variable_name) {
        $pipe['variable'][] = "{$variable_name}_{$node_type}";
      }
    }
  }
}