Neomerx\JsonApi\Contracts\Encoder\Parameters\ParametersAnalyzerInterface::getIncludeRelationships PHP Méthode

getIncludeRelationships() public méthode

Get a list of relationship that should be included for $path of root type $type.
public getIncludeRelationships ( string $path, string $type ) : string[]
$path string
$type string
Résultat string[]
    public function getIncludeRelationships($path, $type);

Usage Example

 /**
  * @inheritdoc
  */
 public function getIncludeRelationships(StackReadOnlyInterface $stack)
 {
     $currentPath = $stack->end()->getPath();
     $currentRootType = $stack->root()->getResource()->getType();
     $includePaths = $this->parameterAnalyzer->getIncludeRelationships($currentPath, $currentRootType);
     return $includePaths;
 }