ModelToExportAdapter Class Reference

Inheritance diagram for ModelToExportAdapter:
ModelToArrayAdapter

Public Member Functions

 getData ()
 getHeaderData ()

Static Public Member Functions

static getLabelFromTwoAttributeStrings ($stringOne, $stringTwo)

Data Fields

const DELIMITER = ' - '

Protected Member Functions

 getRedBeanModelAttributeValueToExportValueAdapterClassName ($attributeName)
 isHasOneVariationOwnedRelation ($attributeName)
 isHasOneVariationNotOwnedRelation ($attributeName)
 resolveIdLabelToTitleCaseForExport ($id)
 getAllAttributesDataAsNull ($attributeName)
 getAllAtttributesDataAsLabels ($attributeName)

Static Protected Member Functions

static resolveExportableAttributesByModel ($model)

Detailed Description

Helper class used to convert models into arrays

Definition at line 40 of file ModelToExportAdapter.php.


Member Function Documentation

getData (  ) 

Get model properties as array. return array

Reimplemented from ModelToArrayAdapter.

Definition at line 59 of file ModelToExportAdapter.php.

getHeaderData (  ) 

Get the header row data which includes a label for each column

Returns:
array $data

Definition at line 117 of file ModelToExportAdapter.php.

static resolveExportableAttributesByModel ( model  )  [static, protected]

Return array of retrievable model attributes

Parameters:
$model 
Returns:
array

Definition at line 180 of file ModelToExportAdapter.php.

getRedBeanModelAttributeValueToExportValueAdapterClassName ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
string

Definition at line 206 of file ModelToExportAdapter.php.

isHasOneVariationOwnedRelation ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
bool

Definition at line 221 of file ModelToExportAdapter.php.

isHasOneVariationNotOwnedRelation ( attributeName  )  [protected]
Parameters:
$attributeName 
Returns:
bool

Definition at line 237 of file ModelToExportAdapter.php.

getAllAttributesDataAsNull ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
array

Definition at line 258 of file ModelToExportAdapter.php.

getAllAtttributesDataAsLabels ( attributeName  )  [protected]
Parameters:
string $attributeName
Returns:
array

Definition at line 273 of file ModelToExportAdapter.php.


Field Documentation

const DELIMITER = ' - '

Use when multiple attribute names need to be combined together into one string that can easily be parsed later.

Definition at line 47 of file ModelToExportAdapter.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Jul 24 07:10:27 2017