public function YAMLExporter::compile 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::compile()
Build $this->output in prep for export/save
This is the main method to be extended for the different exporters
Overrides Exporter::compile
File
- vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ YAMLExporter.php, line 28
Class
- YAMLExporter
- Class YAMLExporter
Namespace
AKlump\LoftDataGridsCode
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);
}