Beispiel #1
0
 /**
  * {@inherit docs}.
  */
 protected function transformObjectToTableBody($model)
 {
     $result = parent::transformObjectToTableBody($model);
     $result[] = ['[Events ID]', '[Events Source]'];
     foreach ($model->events as $event) {
         $result[] = [$event->id, $event->source];
     }
     return $result;
 }
Beispiel #2
0
 /**
  * {@inherit docs}.
  */
 protected function transformObjectToTableBody($model)
 {
     $result = parent::transformObjectToTableBody($model);
     $permissions = '';
     foreach ($model->permissions as $permission) {
         $permissions .= $permission->name . PHP_EOL;
     }
     $result[] = ['Permissions', $permissions];
     return $result;
 }
Beispiel #3
0
 /**
  * {@inherit docs}.
  */
 protected function transformObjectToTableBody($model)
 {
     $result = parent::transformObjectToTableBody($model);
     foreach ($result as $index => $row) {
         if ($row[0] == 'Information') {
             unset($result[$index]);
         }
     }
     $result[] = ['Evidence File', $model->evidence->filename];
     $result[] = ['[Information Field]', '[Information Data]'];
     foreach (json_decode($model->information) as $field => $data) {
         $result[] = [$field, $data];
     }
     return $result;
 }
Beispiel #4
0
 /**
  * {@inherit docs}.
  */
 protected function transformObjectToTableBody($model)
 {
     $result = parent::transformObjectToTableBody($model);
     $roles = [];
     foreach ($model->roles as $role) {
         $roles[] = $role->name;
     }
     if ($roles) {
         $rolesCaption = 'Roles';
         if (count($roles) === 1) {
             $rolesCaption = 'Role';
         }
         $result[] = [$rolesCaption, implode(PHP_EOL, $roles)];
     }
     return $result;
 }
Beispiel #5
0
 /**
  * {@inherit docs}.
  */
 protected function transformObjectToTableBody($model)
 {
     $result = parent::transformObjectToTableBody($model);
     $result = $this->hideProperty($result, 'Password');
     $result = $this->hideProperty($result, 'Account id');
     $result = $this->hideProperty($result, 'Remember token');
     $result[] = ['Account', $model->account->name];
     $roleList = [];
     foreach ($model->roles as $role) {
         $roleList[] = $role->description;
     }
     if ($roleList) {
         $roleCaption = 'Roles';
         if (count($roleList) === 1) {
             $roleCaption = 'Role';
         }
         $result[] = [$roleCaption, implode(PHP_EOL, $roleList)];
     }
     return $result;
 }