/**
  * Get the current GridState_Data or the GridState.
  *
  * @param bool $getData
  *
  * @return GridState_Data|GridState
  */
 public function getState($getData = true)
 {
     if ($getData) {
         return $this->state->getData();
     }
     return $this->state;
 }
 /**
  * @param mixed $d
  * @return object
  */
 public static function array_to_object($d)
 {
     if (is_array($d)) {
         return (object) array_map(function ($item) {
             return GridState::array_to_object($item);
         }, $d);
     }
     return $d;
 }