webCOMAND

ContentTypeField::is_reference_type()

Return TRUE if this field is a reference type field, also known as a relationship field.  A reference type field has a Field Type of a content type, including embedded, forward and back-reference fields.

Prototype

boolean is_reference_type()

Return

Return TRUE if this field is a reference type field, otherwise FALSE.

Example

// list the Web Page Status field's choices
$repo = comand::repo();
$web_page_ct = $repo->get_content_type('SitesWebPage');
$field = $web_page_ct->get_field('Parent');
if($field->is_reference_type()) {
    echo("Parent is a Reference Type field.\n");
}

Related

is_data_type(), is_embedded_reference(), is_forward_reference(), is_back_reference(), is_dimension_field()