src/Subjects/AbstractProductSubject.php
public function prepareLinkTypeMappings()
    {

        // initialize the array with link type mappings
        $linkTypeMappings = array();

        // prepare the link type mappings
        foreach ($this->getLinkTypes() as $linkType) {
            // map the link type code to the column name, if necessary
            $columnName = $this->mapLinkTypeCodeToColumnName($linkType[MemberNames::CODE]);

            // create the header for the link type mapping
            $linkTypeMappings[$linkType[MemberNames::CODE]][] = array (
                $fullColumnName = sprintf('%s_skus', $columnName),
                $this->getLinkTypeColumnCallback($fullColumnName)
            );

            // add the mappings for the columns that contains the values for the configured link type attributes
            foreach ($this->getProductLinkAttributes($linkType[MemberNames::CODE]) as $linkAttribute) {
                // initialize the full column name that uses the column name as prefix and the attribute code as suffix
                $fullColumnName = sprintf('%s_%s', $columnName, $linkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_CODE]);
                // load the callback that extracts the values from the columns
                $callback = $this->getLinkTypeColumnCallback($fullColumnName);

                // map the column name to the real column name
                if (isset($this->linkTypeAttributeColumnToCallbackMapping[$fullColumnName])) {
                    list ($fullColumnName, ) = $this->linkTypeAttributeColumnToCallbackMapping[$fullColumnName];
                }

                // add the link type mapping for the column with the link type value
                $linkTypeMappings[$linkType[MemberNames::CODE]][] = array(
                    $fullColumnName,
                    $callback,
                    $linkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_CODE]
                );
            }
        }

        // return the link type mappings
        return $linkTypeMappings;
    }
public function prepareLinkTypeMappings()
    {

        // initialize the array with link type mappings
        $linkTypeMappings = array();

        // prepare the link type mappings
        foreach ($this->getLinkTypes() as $linkType) {
            // map the link type code to the column name, if necessary
            $columnName = $this->mapLinkTypeCodeToColumnName($linkType[MemberNames::CODE]);

            // create the header for the link type mapping
            $linkTypeMappings[$linkType[MemberNames::CODE]][] = array (
                $fullColumnName = sprintf('%s_skus', $columnName),
                $this->getLinkTypeColumnCallback($fullColumnName)
            );

            // add the mappings for the columns that contains the values for the configured link type attributes
            foreach ($this->getProductLinkAttributes($linkType[MemberNames::CODE]) as $linkAttribute) {
                // initialize the full column name that uses the column name as prefix and the attribute code as suffix
                $fullColumnName = sprintf('%s_%s', $columnName, $linkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_CODE]);
                // load the callback that extracts the values from the columns
                $callback = $this->getLinkTypeColumnCallback($fullColumnName);

                // map the column name to the real column name
                if (isset($this->linkTypeAttributeColumnToCallbackMapping[$fullColumnName])) {
                    list ($fullColumnName, ) = $this->linkTypeAttributeColumnToCallbackMapping[$fullColumnName];
                }

                // add the link type mapping for the column with the link type value
                $linkTypeMappings[$linkType[MemberNames::CODE]][] = array(
                    $fullColumnName,
                    $callback,
                    $linkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_CODE]
                );
            }
        }

        // return the link type mappings
        return $linkTypeMappings;
    }
public function prepareLinkTypeMappings ( ) { // initialize the array with link type mappings $ linkTypeMappings = array ( ) ; // prepare the link type mappings foreach ( $ this -> getLinkTypes ( ) as $ linkType ) { // map the link type code to the column name, if necessary $ columnName = $ this -> mapLinkTypeCodeToColumnName ( $ linkType [ MemberNames :: CODE ] ) ; // create the header for the link type mapping $ linkTypeMappings [ $ linkType [ MemberNames :: CODE ] ] [ ] = array ( $ fullColumnName = sprintf ( '%s_skus' , $ columnName ) , $ this -> getLinkTypeColumnCallback ( $ fullColumnName ) ) ; // add the mappings for the columns that contains the values for the configured link type attributes foreach ( $ this -> getProductLinkAttributes ( $ linkType [ MemberNames :: CODE ] ) as $ linkAttribute ) { // initialize the full column name that uses the column name as prefix and the attribute code as suffix $ fullColumnName = sprintf ( '%s_%s' , $ columnName , $ linkAttribute [ MemberNames :: PRODUCT_LINK_ATTRIBUTE_CODE ] ) ; // load the callback that extracts the values from the columns $ callback = $ this -> getLinkTypeColumnCallback ( $ fullColumnName ) ; // map the column name to the real column name if ( isset ( $ this -> linkTypeAttributeColumnToCallbackMapping [ $ fullColumnName ] ) ) { list ( $ fullColumnName , ) = $ this -> linkTypeAttributeColumnToCallbackMapping [ $ fullColumnName ] ; } // add the link type mapping for the column with the link type value $ linkTypeMappings [ $ linkType [ MemberNames :: CODE ] ] [ ] = array ( $ fullColumnName , $ callback , $ linkAttribute [ MemberNames :: PRODUCT_LINK_ATTRIBUTE_CODE ] ) ; } } // return the link type mappings return $ linkTypeMappings ; }
Return's the link type code => colums mapping.

@return array The mapping with the link type codes => colums
Return s the link type code = > colums mapping .