- ⌂ repo
- Methods
- Constructor
- execute()
- get()
- get_content_type()
- get_first()
- get_object()
- get_object_by_id()
- get_object_by_oid()
- get_object_by_doid()
- get_object_by_uuid()
- get_objects_by_id()
- get_objects_by_oid()
- get_objects_by_doid()
- get_objects_by_uuid()
- get_root()
- get_row()
- get_rows()
- get_system_property()
- log_alert()
- log_critical()
- log_to_file()
- log_to_html()
- new_collection()
- new_object()
- peek_user()
- pop_user()
- push_super_user()
- push_user()
- query()
- supports_dimensions()
- switch_user()
- uninit()
- with()
repo::get_content_type()
Get a content type based on it's identifierQuery a repository and return a collection of matching objects.
Prototype
collection get(mixed $identifier, array $options = [])
Parameters
- identifier - Numeric OID or string Identifier of the Content Type to get.
- options
- force_load - Set to TRUE to force a content type to be (re)loaded from the repository, even if it was already loaded.
Return
If a matching content type is found, the content type is returned. Otherwise, NULL is returned.
Example
Identifier Example
$ct = $repo->get_content_type('Contact');
if($ct) {
echo($ct->Title . " - OID " . $ct->OID . "\n");
} else {
echo("Could not find Content Type with Identifier 'Contact'.\n");
}
OID Example
$ct = $repo->get_content_type(123);
if($ct) {
echo($ct->Title . " - Identifier " . $ct->Identifier . "\n");
} else {
echo("Could not find Content Type with OID 123.\n");
}