<?php
/**
*@file
*Contains \Drupal\boutique_data\Controller\boutique_dataController.
*/
namespace Drupal\boutique_data\Controller;

/**
*boutique_dataController.
*/

class boutique_dataController  {

  public function content()  {
      $result = null;
//      $result = boutique_data_node_test();
      if (boutique_data_rebuild_json_en() != false) {
          $result = 'English: updated<br>';
      } else {
          $result = false;
      }

      if (boutique_data_rebuild_json_fr() != false) {
          $result .= 'French: updated<br>';
      } else {
          $result = false;
      }

      if ($result) {
          return array(
              '#type' => 'markup',
              '#value' => t('Success')
          );
      } else {
          return array(
              '#type' => 'markup',
              '#value' => t('Error updating data')
          );
      }
  }

  public function levels_update() {
      boutique_data_boutique_levels_update();
  }

}
