eZ\Publish\Core\FieldType\RelationList\Type::getRelations PHP Method

getRelations() public method

Not intended for \eZ\Publish\API\Repository\Values\Content\Relation::COMMON type relations, there is an API for handling those.
public getRelations ( eZ\Publish\SPI\FieldType\Value $value ) : array
$value eZ\Publish\SPI\FieldType\Value
return array Hash with relation type as key and array of destination content ids as value. Example: array( \eZ\Publish\API\Repository\Values\Content\Relation::LINK => array( "contentIds" => array( 12, 13, 14 ), "locationIds" => array( 24 ) ), \eZ\Publish\API\Repository\Values\Content\Relation::EMBED => array( "contentIds" => array( 12 ), "locationIds" => array( 24, 45 ) ), \eZ\Publish\API\Repository\Values\Content\Relation::ATTRIBUTE => array( 12 ) )
    public function getRelations(SPIValue $value)
    {
        /* @var \eZ\Publish\Core\FieldType\RelationList\Value $value */
        return array(Relation::FIELD => $value->destinationContentIds);
    }