<?php
/**
 * @file
 * policia_features.features.inc
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function policia_features_ctools_plugin_api($module = NULL, $api = NULL) {
  if ($module == "bean_admin_ui" && $api == "bean") {
    return array("version" => "5");
  }
  if ($module == "context" && $api == "context") {
    return array("version" => "3");
  }
  if ($module == "ds" && $api == "ds") {
    return array("version" => "1");
  }
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_views_api().
 */
function policia_features_views_api($module = NULL, $api = NULL) {
  return array("api" => "3.0");
}

/**
 * Implements hook_eck_bundle_info().
 */
function policia_features_eck_bundle_info() {
  $items = array(
    'unidades_director' => array(
      'machine_name' => 'unidades_director',
      'entity_type' => 'unidades',
      'name' => 'director',
      'label' => 'Director',
    ),
    'unidades_mision' => array(
      'machine_name' => 'unidades_mision',
      'entity_type' => 'unidades',
      'name' => 'mision',
      'label' => 'Mision',
    ),
    'unidades_organigrama' => array(
      'machine_name' => 'unidades_organigrama',
      'entity_type' => 'unidades',
      'name' => 'organigrama',
      'label' => 'Organigrama',
    ),
    'unidades_saludo' => array(
      'machine_name' => 'unidades_saludo',
      'entity_type' => 'unidades',
      'name' => 'saludo',
      'label' => 'Saludo',
    ),
  );
  return $items;
}

/**
 * Implements hook_eck_entity_type_info().
 */
function policia_features_eck_entity_type_info() {
  $items = array(
    'unidades' => array(
      'name' => 'unidades',
      'label' => 'Unidades',
      'properties' => array(),
    ),
  );
  return $items;
}

/**
 * Implements hook_image_default_styles().
 */
function policia_features_image_default_styles() {
  $styles = array();

  // Exported image style: 1125x350.
  $styles['1125x350'] = array(
    'label' => '1125x350',
    'effects' => array(
      5 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 1125,
          'height' => 350,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 130x130.
  $styles['130x130'] = array(
    'label' => '130x130',
    'effects' => array(
      6 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 130,
          'height' => 130,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 265x155.
  $styles['265x155'] = array(
    'label' => '265x155',
    'effects' => array(
      7 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 265,
          'height' => 155,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 270x162.
  $styles['270x162'] = array(
    'label' => '270x162',
    'effects' => array(
      4 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 270,
          'height' => 162,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 332x365.
  $styles['332x365'] = array(
    'label' => '332x365',
    'effects' => array(
      8 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 332,
          'height' => 365,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 570x284.
  $styles['570x284'] = array(
    'label' => '570x284',
    'effects' => array(
      3 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 570,
          'height' => 284,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 75x75.
  $styles['75x75'] = array(
    'label' => '75x75',
    'effects' => array(
      2 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 75,
          'height' => 75,
        ),
        'weight' => 1,
      ),
    ),
  );

  // Exported image style: 965x400.
  $styles['965x400'] = array(
    'label' => '965x400',
    'effects' => array(
      1 => array(
        'name' => 'image_scale_and_crop',
        'data' => array(
          'width' => 965,
          'height' => 400,
        ),
        'weight' => 1,
      ),
    ),
  );

  return $styles;
}

/**
 * Implements hook_node_info().
 */
function policia_features_node_info() {
  $items = array(
    'noticias' => array(
      'name' => t('Noticias'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('Title'),
      'help' => '',
    ),
    'unidades' => array(
      'name' => t('Unidades'),
      'base' => 'node_content',
      'description' => '',
      'has_title' => '1',
      'title_label' => t('Title'),
      'help' => '',
    ),
  );
  drupal_alter('node_info', $items);
  return $items;
}
