Skip to content

how to get relationship type using PiplApi_Relationship #2

Description

@darkwish121

Hi,

I am getting relationship data using

$relationshipsData = $record['relationships'];

    foreach ($relationshipsData as $relationship) {

        print "relation: " .  $relationship['name']['display'];         
    }

but how can I get the type of relation.

how to use following function of this class and which classname should be give as first parameter?

public static function from_dict($clsname, $d)
{
    // Extend Field.from_dict and also load the name from the dict.
    $relationship = PiplApi_Field::from_dict('PiplApi_Relationship', $d);
    if (!empty($relationship->name))
    {
        $relationship->name = PiplApi_Field::from_dict('PiplApi_Name', $relationship->name);
    }
    return $relationship;
}

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions