function _eck_title_property_extract_title in Entity Construction Kit (ECK) 7.2
Same name and namespace in other branches
- 7.3 plugins/property_behavior/title.inc \_eck_title_property_extract_title()
Helper function that gets the title from an entity.
Parameters
object $entity: an entity object.
string $property: the name of the property that contains the title.
Return value
string The title of the entity.
2 calls to _eck_title_property_extract_title()
- eck_title_property_entity_view in plugins/
property_behavior/ title.inc - When we are viewing the entity, set the pages title.
- eck_title_property_widget in plugins/
property_behavior/ title.inc - How to input a title.
File
- plugins/
property_behavior/ title.inc, line 75
Code
function _eck_title_property_extract_title($entity, $property) {
$title = "";
if (isset($entity->{$property})) {
$title = $entity->{$property};
}
return $title;
}