function facebook_publication_get_types in Facebook Autopost 7
Gets an array of all Facebook publication types, keyed by the type name.
Parameters
string $type_name: If set, the type with the given name is returned.
Return value
FacebookPublicationTypeEntity[] Depending whether $type isset, an array of Facebook publication types or a single one.
4 calls to facebook_publication_get_types()
- FacebookPublicationEntity::type in fb_autopost_entity/
fb_autopost_entity.module - Gets the associated Facebook publication type object.
- FacebookPublicationEntity::__construct in fb_autopost_entity/
fb_autopost_entity.module - Entity constructor.
- facebook_publication_type_load in fb_autopost_entity/
fb_autopost_entity.module - Menu argument loader; Load a Facebook publication type by string.
- fb_autopost_entity_permission in fb_autopost_entity/
fb_autopost_entity.module - Implements hook_permission().
1 string reference to 'facebook_publication_get_types'
- facebook_publication_type_form in fb_autopost_entity/
fb_autopost_entity.admin.inc - Generates the Facebook publication type editing form.
File
- fb_autopost_entity/
fb_autopost_entity.module, line 192 - Module implementation file
Code
function facebook_publication_get_types($type_name = NULL) {
$types = entity_load_multiple_by_name('facebook_publication_type', isset($type_name) ? array(
$type_name,
) : FALSE);
return isset($type_name) ? reset($types) : $types;
}