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

/**
*ZoneClearController.
*/

class ZoneClearController  {

  public function clear()  {
      $result = null;
      $result = boutique_data_node_clear();
//      boutique_data_boutique_levels_update();
//      if (boutique_data_rebuild_json_en() != false) {
//          $result = 'English: updated<br>';
//      }

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

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

}
