public function __toString()
{
$guesses = array('name', 'title', 'description', 'subject', 'keywords', 'id');
// we try to guess a column which would give a good description of the object
foreach ($guesses as $descriptionColumn) {
try {
return (string) $this->get($descriptionColumn);
} catch (Exception $e) {
}
}
return sprintf('No description for object of class "%s"', $this->getTable()->getComponentName());
}