function _eck_title_and_formatter_property_extract_title in Entity Construction Kit (ECK) 7.2
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.
3 calls to _eck_title_and_formatter_property_extract_title()
- eck_title_and_formatter_property_entity_view in plugins/
property_behavior/ title_and_formatter.inc - When we are viewing the entity, set the pages title.
- eck_title_and_formatter_property_formatter in plugins/
property_behavior/ title_and_formatter.inc - Display the title as an h1.
- eck_title_and_formatter_property_widget in plugins/
property_behavior/ title_and_formatter.inc - How to input a title.
File
- plugins/
property_behavior/ title_and_formatter.inc, line 85
Code
function _eck_title_and_formatter_property_extract_title($entity, $property) {
$title = "";
if (isset($entity->{$property})) {
$title = $entity->{$property};
}
return $title;
}