src/Listener/RelatedModelsListener.php
public function getAssociatedByType($types = [])
    {
        $return = [];

        $table = $this->_table();
        foreach ($table->associations()->keys() as $association) {
            $associationClass = $table->associations()->get($association);
            if (!in_array($associationClass->type(), $types)) {
                continue;
            }

            $return[$associationClass->getName()] = $associationClass;
        }

        return $return;
    }
public function getAssociatedByType($types = [])
    {
        $return = [];

        $table = $this->_table();
        foreach ($table->associations()->keys() as $association) {
            $associationClass = $table->associations()->get($association);
            if (!in_array($associationClass->type(), $types)) {
                continue;
            }

            $return[$associationClass->getName()] = $associationClass;
        }

        return $return;
    }
public function getAssociatedByType ( $ types = [ ] ) { $ return = [ ] ; $ table = $ this -> _table ( ) ; foreach ( $ table -> associations ( ) -> keys ( ) as $ association ) { $ associationClass = $ table -> associations ( ) -> get ( $ association ) ; if ( ! in_array ( $ associationClass -> type ( ) , $ types ) ) { continue ; } $ return [ $ associationClass -> getName ( ) ] = $ associationClass ; } return $ return ; }
Get associated tables based on the current table instance based on their
association type

@param array $types Association types
@return array
Get associated tables based on the current table instance based on their association type