src/ORM/DataObjectSchema.php
public function manyManyExtraFieldsForComponent($class, $component)
    {
        // Get directly declared many_many_extraFields
        $extraFields = Config::inst()->get($class, 'many_many_extraFields');
        if (isset($extraFields[$component])) {
            return $extraFields[$component];
        }

        // If not belongs_many_many then there are no components
        while ($class && ($class !== DataObject::class)) {
            $belongsManyMany = Config::inst()->get($class, 'belongs_many_many', Config::UNINHERITED);
            if (isset($belongsManyMany[$component])) {
                // Reverse relationship and find extrafields from child class
                $belongs = $this->parseBelongsManyManyComponent(
                    $class,
                    $component,
                    $belongsManyMany[$component]
                );
                return $this->manyManyExtraFieldsForComponent($belongs['childClass'], $belongs['relationName']);
            }
            $class = get_parent_class($class);
        }
        return null;
    }
public function manyManyExtraFieldsForComponent($class, $component)
    {
        // Get directly declared many_many_extraFields
        $extraFields = Config::inst()->get($class, 'many_many_extraFields');
        if (isset($extraFields[$component])) {
            return $extraFields[$component];
        }

        // If not belongs_many_many then there are no components
        while ($class && ($class !== DataObject::class)) {
            $belongsManyMany = Config::inst()->get($class, 'belongs_many_many', Config::UNINHERITED);
            if (isset($belongsManyMany[$component])) {
                // Reverse relationship and find extrafields from child class
                $belongs = $this->parseBelongsManyManyComponent(
                    $class,
                    $component,
                    $belongsManyMany[$component]
                );
                return $this->manyManyExtraFieldsForComponent($belongs['childClass'], $belongs['relationName']);
            }
            $class = get_parent_class($class);
        }
        return null;
    }
public function manyManyExtraFieldsForComponent ( $ class , $ component ) { // Get directly declared many_many_extraFields $ extraFields = Config :: inst ( ) -> get ( $ class , 'many_many_extraFields' ) ; if ( isset ( $ extraFields [ $ component ] ) ) { return $ extraFields [ $ component ] ; } // If not belongs_many_many then there are no components while ( $ class && ( $ class !== DataObject :: class ) ) { $ belongsManyMany = Config :: inst ( ) -> get ( $ class , 'belongs_many_many' , Config :: UNINHERITED ) ; if ( isset ( $ belongsManyMany [ $ component ] ) ) { // Reverse relationship and find extrafields from child class $ belongs = $ this -> parseBelongsManyManyComponent ( $ class , $ component , $ belongsManyMany [ $ component ] ) ; return $ this -> manyManyExtraFieldsForComponent ( $ belongs [ 'childClass' ] , $ belongs [ 'relationName' ] ) ; } $ class = get_parent_class ( $ class ) ; } return null ; }
Return the many-to-many extra fields specification for a specific component.

@param string $class
@param string $component

@return array|null
Return the many - to - many extra fields specification for a specific component .