protected function _outputArray(array $data, $singular_object_name = 'Entity', $plural_object_name = 'Entities') { $uriExplode = explode('/', $_SERVER['REQUEST_URI']); if ($data && key_exists(2, $uriExplode)) { $singular_object_name = mb_convert_encoding($this->translate[$uriExplode[2]], "HTML-ENTITIES", "UTF-8"); $plural_object_name = $singular_object_name . 's'; } ?> <!DOCTYPE html> <html> <head> <title><?php echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data)); ?> </title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> table table th {text-align: left; white-space: nowrap; } </style> </head> <body> <h1><?php echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data)); ?> </h1> <?php $this->printTable($data); ?> </body> </html> <?php }
protected function _outputArray(array $data, $singular_object_name = 'Entity', $plural_object_name = 'Entities') { if (!key_exists('type', $data[0])) { die('@select entity type property is mandatory. Aborting'); } $singular_object_name = $this->translate[$data[0]['type']->entity_class]; $plural_object_name = $singular_object_name . 's'; ?> <!DOCTYPE html> <html> <head> <title><?php echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data)); ?> </title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> table table th {text-align: left; white-space: nowrap; } </style> </head> <body> <h1><?php echo sprintf(App::txts("%s {$singular_object_name} encontrado.", "%s {$plural_object_name} encontrados.", count($data)), count($data)); ?> </h1> <?php $this->printTable($data); ?> </body> </html> <?php }