Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get relationship type using PiplApi_Relationship #2

Open
darkwish121 opened this issue Apr 22, 2014 · 0 comments
Open

how to get relationship type using PiplApi_Relationship #2

darkwish121 opened this issue Apr 22, 2014 · 0 comments

Comments

@darkwish121
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant