src/Listener/RelatedModelsListener.php
public function relatedModels($related = null, $action = null)
    {
        if ($related === null) {
            return $this->_action($action)->getConfig('relatedModels');
        }

        return $this->_action($action)->setConfig('relatedModels', $related, false);
    }
public function relatedModels($related = null, $action = null)
    {
        if ($related === null) {
            return $this->_action($action)->getConfig('relatedModels');
        }

        return $this->_action($action)->setConfig('relatedModels', $related, false);
    }
public function relatedModels ( $ related = null , $ action = null ) { if ( $ related === null ) { return $ this -> _action ( $ action ) -> getConfig ( 'relatedModels' ) ; } return $ this -> _action ( $ action ) -> setConfig ( 'relatedModels' , $ related , false ) ; }
Set or get the related models that should be found
for the action

@param mixed $related Everything but `null` will change the configuration
@param string|null $action The action to configure
@return mixed
Set or get the related models that should be found for the action