class YAMLExporter in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/YAMLExporter.php \AKlump\LoftDataGrids\YAMLExporter
Class YAMLExporter
http://symfony.com/doc/current/components/yaml/introduction.html
Hierarchy
- class \AKlump\LoftDataGrids\Exporter implements ExporterInterface
- class \AKlump\LoftDataGrids\YAMLExporter implements ExporterInterface
Expanded class hierarchy of YAMLExporter
File
- vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ YAMLExporter.php, line 10
Namespace
AKlump\LoftDataGridsView source
class YAMLExporter extends Exporter implements ExporterInterface {
protected $extension = '.yml';
public function __construct(ExportDataInterface $data = NULL, $filename = '') {
parent::__construct($data, $filename);
}
public function getInfo() {
$info = parent::getInfo();
$info = array(
'name' => 'YAML Format',
'shortname' => 'YAML',
'description' => 'Export data in YAML file format. For more information visit: http://www.yaml.org.',
) + $info;
return $info;
}
public function compile($page_id = NULL) {
$pages = $this
->getData()
->get();
if (isset($page_id) && array_key_exists($page_id, $pages)) {
$pages = $pages[$page_id];
}
$this->output = Yaml::dump($pages);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Exporter:: |
protected | property | ||
Exporter:: |
protected | property | ||
Exporter:: |
protected | property | ||
Exporter:: |
public | function |
Adds/Updates a single setting by name. Overrides ExporterInterface:: |
|
Exporter:: |
protected | function | ||
Exporter:: |
public | function |
Export data as a string Overrides ExporterInterface:: |
1 |
Exporter:: |
protected | function | Return a string as a safe filename | |
Exporter:: |
public | function |
Format a single column with format by string Overrides ExporterInterface:: |
1 |
Exporter:: |
public | function |
Return the ExportDataInterface object Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Get the filename Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Return an array containing the header row values for a page Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Return the settings object. Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Return the showPageIds. Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Set the exporter to hide page ids. Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Save as a file to the server Overrides ExporterInterface:: |
1 |
Exporter:: |
public | function |
Set the export data object Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Getter/Setter for the filename Overrides ExporterInterface:: |
|
Exporter:: |
public | function |
Set the settings object. Overrides ExporterInterface:: |
|
Exporter:: |
protected | function | Setup default values on object data. | 1 |
Exporter:: |
public | function |
Set a title for the exported document Overrides ExporterInterface:: |
1 |
Exporter:: |
public | function |
Set the exporter to display page ids. Overrides ExporterInterface:: |
|
YAMLExporter:: |
protected | property | ||
YAMLExporter:: |
public | function |
Build $this->output in prep for export/save Overrides Exporter:: |
|
YAMLExporter:: |
public | function |
Return info about this class Overrides Exporter:: |
|
YAMLExporter:: |
public | function |
Constructor Overrides Exporter:: |