Varien_Convert_Mapper_Column Class Reference

Inheritance diagram for Varien_Convert_Mapper_Column:

Varien_Convert_Mapper_Abstract Varien_Convert_Container_Abstract Varien_Convert_Mapper_Interface Varien_Convert_Container_Interface

List of all members.

Public Member Functions

 map ()


Detailed Description

Definition at line 35 of file Column.php.


Member Function Documentation

map (  ) 

Implements Varien_Convert_Mapper_Interface.

Definition at line 37 of file Column.php.

00038     {
00039         $data = $this->getData();
00040         $this->validateDataGrid($data);
00041         if ($this->getVars() && is_array($this->getVars())) {
00042             $attributesToSelect = $this->getVars();
00043         } else {
00044             $attributesToSelect = array();
00045         }
00046         $onlySpecified = (bool)$this->getVar('_only_specified')===true;
00047         $mappedData = array();
00048         foreach ($data as $i=>$row) {
00049             $newRow = array();
00050             foreach ($row as $field=>$value) {
00051                 if(!$onlySpecified || $onlySpecified && isset($attributesToSelect[$field])) {
00052                     $newRow[$this->getVar($field, $field)] = $value;
00053                 }
00054             }
00055             $mappedData[$i] = $newRow;
00056         }
00057         $this->setData($mappedData);
00058         return $this;
00059     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:58 2009 for Magento by  doxygen 1.5.8