SLP_Power_Locations_Export
extends SLPlus_BaseClass_Object
in package
Export locations to a CSV file.
Table of Contents
Properties
- $slplus : SLPlus
- $uses_slplus : bool
- $slplus : mixed
- $type : mixed
- $uses_slplus : mixed
- $active_columns : mixed
- $dbFields : mixed
Methods
- __construct() : mixed
- __get() : SLPlus_BaseClass_Object
- __isset() : bool
- add_tagalong_data_to_export() : array<string|int, mixed>
- Add categories to the location data.
- do_SendFile() : mixed
- AJAX handler to send the data to a download file for the user.
- do_WriteFile() : mixed
- Write a file without sending an HTML header, this is for local disk writes.
- get_instance() : SLPlus_BaseClass_Object
- Return an instance of the object which is also registered to the slplus global less the SLP_ part.
- initialize() : mixed
- Things we do at the start.
- send_Header() : mixed
- Send the CSV Header
- set_properties() : mixed
- Set our properties.
- add_extended_fields_to_export() : mixed
- Add extended data fields to the csv export
- add_unique_field_slugs_to_export() : mixed
- Only add unique slugs to the field list.
- send_locations() : mixed
- Send Locations
Properties
$slplus
public
SLPlus
$slplus
$uses_slplus
public
bool
$uses_slplus
Set to true (default) if the object needs access to the SLPlus plugin object.
$slplus
protected
mixed
$slplus
$type
protected
mixed
$type
$uses_slplus
protected
mixed
$uses_slplus
= \true
$active_columns
private
mixed
$active_columns
$dbFields
private
mixed
$dbFields
= array('sl_id', 'sl_store', 'sl_address', 'sl_address2', 'sl_city', 'sl_state', 'sl_zip', 'sl_country', 'sl_latitude', 'sl_longitude', 'sl_tags', 'sl_description', 'sl_email', 'sl_url', 'sl_hours', 'sl_phone', 'sl_fax', 'sl_image', 'sl_private', 'sl_neat_title')
Methods
__construct()
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
__get()
public
__get(string $property) : SLPlus_BaseClass_Object
Parameters
- $property : string
Return values
SLPlus_BaseClass_Object__isset()
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
booladd_tagalong_data_to_export()
Add categories to the location data.
public
add_tagalong_data_to_export(array<string|int, mixed> $locationArray) : array<string|int, mixed>
Parameters
- $locationArray : array<string|int, mixed>
Return values
array<string|int, mixed>do_SendFile()
AJAX handler to send the data to a download file for the user.
public
do_SendFile() : mixed
do_WriteFile()
Write a file without sending an HTML header, this is for local disk writes.
public
do_WriteFile(string $output_file) : mixed
Parameters
- $output_file : string
-
the output location php://output for download files
get_instance()
Return an instance of the object which is also registered to the slplus global less the SLP_ part.
public
static get_instance([bool $no_global = false ][, mixed $params = array() ]) : SLPlus_BaseClass_Object
TODO: PHP7.4 and PHP8.0 the static instance variable returns an object matching $class TODO: PHP8.1 the static instance continually returns the FIRST object (SLP_Admin_Helper) every time -- it is like PHP8.1 static instance is bound to base_class-object versus the calling class object
Parameters
- $no_global : bool = false
-
set to true to skip assigning object to SLP global as a property.
- $params : mixed = array()
-
object init params
Return values
SLPlus_BaseClass_Objectinitialize()
Things we do at the start.
public
initialize() : mixed
send_Header()
Send the CSV Header
public
send_Header() : mixed
set_properties()
Set our properties.
public
set_properties([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
add_extended_fields_to_export()
Add extended data fields to the csv export
private
add_extended_fields_to_export() : mixed
add_unique_field_slugs_to_export()
Only add unique slugs to the field list.
private
add_unique_field_slugs_to_export(array<string|int, string> $slug_list) : mixed
Parameters
- $slug_list : array<string|int, string>
send_locations()
Send Locations
private
send_locations([string $output_location = 'php://output' ]) : mixed
Parameters
- $output_location : string = 'php://output'
-
the output location php://output for download files