src/Listener/RelatedModelsListener.php
public function models($action = null)
    {
        $settings = $this->relatedModels(null, $action);

        if ($settings === true) {
            return $this->getAssociatedByType(['oneToOne', 'manyToMany', 'manyToOne']);
        }

        if (empty($settings)) {
            return [];
        }

        if (is_string($settings)) {
            $settings = [$settings];
        }

        return $this->getAssociatedByName($settings);
    }
public function models($action = null)
    {
        $settings = $this->relatedModels(null, $action);

        if ($settings === true) {
            return $this->getAssociatedByType(['oneToOne', 'manyToMany', 'manyToOne']);
        }

        if (empty($settings)) {
            return [];
        }

        if (is_string($settings)) {
            $settings = [$settings];
        }

        return $this->getAssociatedByName($settings);
    }
public function models ( $ action = null ) { $ settings = $ this -> relatedModels ( null , $ action ) ; if ( $ settings === true ) { return $ this -> getAssociatedByType ( [ 'oneToOne' , 'manyToMany' , 'manyToOne' ] ) ; } if ( empty ( $ settings ) ) { return [ ] ; } if ( is_string ( $ settings ) ) { $ settings = [ $ settings ] ; } return $ this -> getAssociatedByName ( $ settings ) ; }
Gets the list of associated model lists to be fetched for an action

@param string|null $action name of the action
@return array
Gets the list of associated model lists to be fetched for an action