Example #1
0
 /**
  * Return a single row from the crud's table
  *
  * @param array $keys
  * @return array
  */
 protected function getRowData(array $keys)
 {
     if (empty($keys)) {
         return [];
     }
     $rowData = Queries::getSingleTableRow($this->getTable(), $keys);
     $rowData = get_object_vars($rowData);
     $formatted = [];
     foreach ($rowData as $columnName => $columnValue) {
         $formatted[$columnName] = ['value' => $columnValue];
     }
     return $formatted;
 }