- ⌂ Content Type
- Methods
ContentType::is_or_extends()
Return true if this content type is or extends a specified content type.
Prototype
bool is_or_extends(mixed $content_type)
Parameters
- content_type - Content Type to compare in any of the following formats.
- OID
- Identifier
- Object
Return
Returns TRUE if this content type is or extends the specified content type. Otherwise FALSE.
Example
$repo = comand::repo();
$app_user_ct = $repo->get_content_type('AppUser');
$is_user = $app_user_ct->is_or_extends('User');
echo('AppUser ' . ($is_user ? 'extends' : 'does not extend') . ' User');