![]() |
Framework
3.9
|
Inheritance diagram for DataImportColumn:
Collaboration diagram for DataImportColumn:Public Member Functions | |
| __construct ($field, $position, $label="", $options, $importer, $update_empty=true) | |
| Creates a data import column definition. More... | |
| formatOptionPreview ($obj, $old) | |
| For fields whose value is derived from a provided options array, format the display of the column in the preview table. More... | |
| startFormatPreview ($obj, $old, $field) | |
| If the value has changed, show the new value in bold. More... | |
| getWarning ($obj) | |
| endFormatPreview ($old, $field) | |
| If the value has changed, show the old value in the table preview. More... | |
| isChanged ($old, $field) | |
| Determine if the value has changed. More... | |
| formatPreview ($obj, $old) | |
| Default preview table formatter. More... | |
| importOption ($obj, $value) | |
| If no customized callback function for setting the columns value on import is provided for a column with options, use this import logic. More... | |
| formatOptions () | |
| Called by input table - show the set of options that represent valid input for the column. More... | |
| import ($obj, $value) | |
| Default importer for columns. More... | |
Public Member Functions inherited from DataItem | |
| DataItem () | |
| Constructor. More... | |
| __sleep () | |
| fireEvent ($event) | |
| Fires the specified event to all registered handlers. More... | |
| joinTransaction ($tx) | |
| Join the DataItem to the specified DataTransaction. More... | |
| getTransaction () | |
| Retrieves the current DataTransaction. More... | |
| cast ($class) | |
| Cast this object to another class. More... | |
| disablePrimaryKey () | |
| enablePrimaryKey () | |
| getHiddenFields () | |
| Retrieves the list of hidden fields. More... | |
| populate ($line, $alias=false) | |
| Populates the object using the supplied associative array (field -> value). More... | |
| getFields () | |
| Retrieve the field type list for this object. More... | |
| overrideFieldType ($field, $type) | |
| Override the type for the specified field. More... | |
| getFieldList ($alias="") | |
| Returned a comma-separated list of the fields for this object (applying the assigned filter if there is one). More... | |
| getFieldArray () | |
| Return an array of field names for this object filtered by any active filter. More... | |
| hasField ($field) | |
| Returns true if this DataItem contains a field with the specified name and that field is not excluded by a filter. More... | |
| hasRelation ($relation) | |
| Returns true if this DataItem contains a relation with the specified name. More... | |
| getPrimaryKey () | |
| Retrieves the primary key field name. More... | |
| getPrimaryKeyList () | |
| Retrieves a list of all the primary keys used for an object as an array. More... | |
| get ($field) | |
| Retrieve the value for the specified field. More... | |
| set ($field, $value) | |
| Set the value of the specified field. More... | |
| getType ($field) | |
| Retrieves the data type of the specified field. More... | |
| getFilter () | |
| Returns the filter set on this object. More... | |
| setFilter ($filter) | |
| Sets the filter on this object. More... | |
| getFieldAliases () | |
| Retrieve the list of field aliases. More... | |
| getFieldAnnotations () | |
| Retrieve the list of field annotations. More... | |
| pack () | |
| The pack() method is called prior to persisting a DataItem to storage. More... | |
| unpack () | |
| The unpack() method is called after populating a DataItem. More... | |
| load ($id) | |
| Load the object with the specified primary key. More... | |
| old () | |
| Retrieves the currently stored state of the DataItem from the database and returns it as a new object. More... | |
| loadComposite () | |
| Creates an outer CompositeDataItem from its base component. More... | |
| save () | |
| Store the object in the database. More... | |
| select () | |
| Select the object from the database, based on the value of the primary key field. More... | |
| exists ($constraint="") | |
| Check whether the object exists in the database. More... | |
| update () | |
| Update the row in the database that corresponds to this object. More... | |
| updateExplicit ($updates, $params=null) | |
| Executes an explicit update command against the database. More... | |
| insert () | |
| Insert a new row in the database to store this object. More... | |
| delete ($constraint="") | |
| Delete the row in the database that corresponds to this object. More... | |
| deleteAll () | |
| Delete all the rows in the database that correspond to this class. More... | |
| tableExists () | |
| Check if the table for this class exists in the database. More... | |
| duplicate () | |
| Persists a duplicate of the DataItem to the database under a new primary key. More... | |
| distinctValues ($field, $sorted=false, $constraint="") | |
| Retrieves the distinct values in the database for the specified field across the specified set of records. More... | |
| fromGET () | |
| Automatically populate the object based on parameters in the $_GET collection. More... | |
| fromPOST () | |
| Automatically populate the object based on parameters in the $_POST collection. More... | |
| fromREQUEST () | |
| Automatically populate the object based on parameters in either the $_GET or $_POST collection, depending on the method used to access the page. More... | |
| fromDataSet ($params) | |
| Automatically populate the object based on a custom set of parameters (such as a filtered $_POST collection) More... | |
| compare ($to) | |
| Compare this object to another object. More... | |
| copy ($from) | |
| Copies values from another object, field by field. More... | |
| cloneFrom ($from) | |
| Copies values from another object, field by field, excluding the primary key. More... | |
| cacheLookup ($id) | |
| Populate the object from the local cache if the object is marked as "cacheLocal". More... | |
| getRelated ($class, $field="") | |
| Returns a single item related by the specified foreign key. More... | |
| getRelatedList ($class, $field="", $orderBy="") | |
| Returns a list of items that are related to this item. More... | |
| crossReference ($class, $xref, $orderBy="", $pkField="", $xrefField="") | |
| Returns a list of items related to this item via a cross-reference table. More... | |
| queryValue ($func) | |
| Query the database to calculate an aggregate value. More... | |
| toXML ($indent=0, $path=null) | |
| Generates an XML representation of the object. More... | |
| fromXML ($node) | |
| Populates the object from the specified XML node. More... | |
| toJSON () | |
| format ($template="", $separator=", ") | |
| Substitute values for field names in a string, with the fields formatted using their type's default format or according to the formatting template sting passed in. More... | |
| formatField ($template) | |
| formatThroughRelation ($template, $separator=", ") | |
| prettifyFieldName ($field) | |
| relateTo ($target, $field="") | |
| Link this object to the specified target by setting corresponding field to the value of the target's primary key. More... | |
Public Member Functions inherited from AbstractDataItem | |
| decorate ($name, $value) | |
| Adds a decoration to the DataItem. More... | |
| getDecoration ($name) | |
| Retrieve the value of a decoration on the current DataItem. More... | |
| setOption ($opt) | |
| Set a behavior option flag. More... | |
| clearOptions ($opt) | |
| Clear the specified behavior option flag. More... | |
| getConnection () | |
| Retrieves a connection to the database. More... | |
| getIdentityConstraint () | |
| Subclasses can override this function to provide additional identity constraints to be used when querying or updating. More... | |
| populate ($line) | |
| Populates the object using the supplied associative array (field -> value). More... | |
| getPrimaryKeyValue () | |
| Retrieves the primary key value. More... | |
| quoteFieldValue ($field, $type=null) | |
| Returns the properly quoted value of the specified field. More... | |
| quoteValue ($val, $type) | |
| formatFieldValue ($field, $template="") | |
| formatFieldForXML ($field) | |
| Format field for XML output. More... | |
| reformatToSQLDate ($date) | |
| Reformats the specified date to be in a format used by the database. More... | |
| reformatFromSQLDate ($date) | |
| fromJSON ($json) | |
| Populate from the supplied JSON object. More... | |
| prettifyClassName ($plural=false) | |
Public Attributes | |
| $fields | |
| $options = array() | |
| optional - from related table or DataItem array whose value must match imported value More... | |
| $importer | |
| optional callback to handle customized login on import of a column More... | |
| $template | |
| formatting template for preview display of the data item field More... | |
| $preview_template | |
| formatting template for preview display of the entire cell More... | |
| $warnings = array() | |
| store warnings indexed by the object row number pseudo field More... | |
Public Attributes inherited from DataItem | |
| $_tx = null | |
| $_pkDisabled = false | |
Public Attributes inherited from AbstractDataItem | |
| $filter | |
| $_options = 0 | |
| $_tx = null | |
| Tracks the current database transaction for each DataItem. More... | |
| $_decorations = null | |
Additional Inherited Members | |
Static Public Member Functions inherited from DataItem | |
| static | registerEventHandler ($class, $event, $handler) |
| Register an event handler for a specific event and DataItem class. More... | |
Static Public Attributes inherited from DataItem | |
| static | $_eventMap = array() |
| static | $dataTypeRendererMap |
Definition at line 871 of file data_import_manager.inc.
| DataImportColumn::__construct | ( | $field, | |
| $position, | |||
$label = "", |
|||
| $options, | |||
| $importer, | |||
$update_empty = true |
|||
| ) |
Creates a data import column definition.
| string | $field | - column name for table imported to |
| number | $position | - column order/position in import |
| string | $label | - label for the column |
| array | $options | - optional set of valid options for the imported data, if lookup is used |
| callback | $importer | - optional for handling customizezd data import logic for the column |
| boolean | update_empty - whether to save updated values that are empty, overriding existing nonempty values |
Definition at line 896 of file data_import_manager.inc.
| DataImportColumn::endFormatPreview | ( | $old, | |
| $field | |||
| ) |
If the value has changed, show the old value in the table preview.
| obj | $old | |
| string | $field |
Definition at line 995 of file data_import_manager.inc.
| DataImportColumn::formatOptionPreview | ( | $obj, | |
| $old | |||
| ) |
For fields whose value is derived from a provided options array, format the display of the column in the preview table.
| obj | $obj | |
| obj | $old |
Definition at line 933 of file data_import_manager.inc.
| DataImportColumn::formatOptions | ( | ) |
Called by input table - show the set of options that represent valid input for the column.
Definition at line 1078 of file data_import_manager.inc.
| DataImportColumn::formatPreview | ( | $obj, | |
| $old | |||
| ) |
Default preview table formatter.
| obj | $obj | |
| obj | $old |
Definition at line 1035 of file data_import_manager.inc.
| DataImportColumn::getWarning | ( | $obj | ) |
Definition at line 977 of file data_import_manager.inc.
| DataImportColumn::import | ( | $obj, | |
| $value | |||
| ) |
Default importer for columns.
| obj | $obj | |
| string | $value |
Definition at line 1100 of file data_import_manager.inc.
| DataImportColumn::importOption | ( | $obj, | |
| $value | |||
| ) |
If no customized callback function for setting the columns value on import is provided for a column with options, use this import logic.
| obj | $obj | |
| string | $value |
Definition at line 1056 of file data_import_manager.inc.
| DataImportColumn::isChanged | ( | $old, | |
| $field | |||
| ) |
Determine if the value has changed.
We can discern this using the filter b/c for objects for which a match in the db was found, we include in the inclusion filter only those fields whose value has changed.
| obj | $old | |
| string | $field |
Definition at line 1015 of file data_import_manager.inc.
| DataImportColumn::startFormatPreview | ( | $obj, | |
| $old, | |||
| $field | |||
| ) |
If the value has changed, show the new value in bold.
If we have a warning for this object and this column, display it in the preview.
| obj | $obj | |
| obj | $old | |
| string | $field |
Definition at line 959 of file data_import_manager.inc.
| DataImportColumn::$fields |
Definition at line 873 of file data_import_manager.inc.
| DataImportColumn::$importer |
optional callback to handle customized login on import of a column
Definition at line 881 of file data_import_manager.inc.
| DataImportColumn::$options = array() |
optional - from related table or DataItem array whose value must match imported value
Definition at line 880 of file data_import_manager.inc.
| DataImportColumn::$preview_template |
formatting template for preview display of the entire cell
Definition at line 883 of file data_import_manager.inc.
| DataImportColumn::$template |
formatting template for preview display of the data item field
Definition at line 882 of file data_import_manager.inc.
| DataImportColumn::$warnings = array() |
store warnings indexed by the object row number pseudo field
Definition at line 884 of file data_import_manager.inc.