Example #1
0
 /**
  * {@inheritdoc}
  */
 public function jsonSerialize()
 {
     $data = parent::jsonSerialize();
     foreach ($data as $index => $row) {
         if ($row === null) {
             unset($data[$index]);
         }
     }
     return $data;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function jsonSerialize()
 {
     $data = parent::jsonSerialize();
     // Get rid of the empty values
     foreach ($data as $index => $row) {
         if ($row === null) {
             unset($data[$index]);
         }
     }
     return $data;
 }