You are here

function _profile2_entity_diff_additional_options_label in Profile 2 7.2

Private callback function to render the label field.

File

contrib/profile2_diff.module, line 148
Provides functionality to show a diff between two profile2 revisions.

Code

function _profile2_entity_diff_additional_options_label($old_profile, $new_profile, $context) {
  $row = array(
    '#name' => 'Label',
    '#states' => array(),
    '#weight' => -5,
    '#settings' => array(
      'show_header' => variable_get('diff_show_header_profile', 1),
    ),
  );
  foreach ($context['states'] as $state) {
    $row['#states'][$state] = array(
      '#old' => array(
        $old_profile
          ->label(),
      ),
      '#new' => array(
        $new_profile
          ->label(),
      ),
    );
  }
  return $row;
}