Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • Captcha
  • CMSUsers
  • DataTables
  • Export
  • FlashMessage
  • Ownership
  • PDF

Class Export

Export Helper Class definition.

Namespace: CMS\Helpers
Used by: Core\Base\Entity::export()
Located at helpers/export.php

Methods summary

public static
# exportToExcel( array $data, array $fields, boolean $table_caption = true, string $filename = 'export', string $date_format = 'Ymd' )

Formats data for MS Excel document.

Formats data for MS Excel document.

Parameters

$data
Array of objects.
$fields
Fields to export.
$table_caption
Whether to show table caption.
$filename
Name of the file.
$date_format
Date format.
public static boolean
# populateCsvfileCustomQuery( array $query, string $csv_file, integer $walker_step = 1200, boolean $caption = true )

Exports data in CSV format and stores it in existing file.

Exports data in CSV format and stores it in existing file.

Parameters

$query
Example ['fields' => '', 'query' => '', 'params' => ''].
$csv_file
Representation of absolute path to a file with writable permission over it.
$walker_step
Number of paginated query rows per iteration.
$caption
Whether to print or not leading row as caption.

Returns

boolean

Uses

Core\Base\Model
Core\DB()
public static string
# getCsvBuffered( string $file, integer $chunk_size = 2, string $filename = null )

Buffered output of a csv file for download.

Buffered output of a csv file for download.

Parameters

$file
Path to the file.
$chunk_size
Size in MB (1M = 1024 * 1024) default is set to 2MB.
$filename
Optional exported file name.

Returns

string
Silla.IO API API documentation generated by ApiGen