Skip to content

Instantly share code, notes, and snippets.

@odino
Created August 25, 2010 13:14
Embed
What would you like to do?
public function getAsset()
{
return $this->getDataProperty('Asset', 1, 'file');
}
######### In una parent
public function getDataproperty($model, $id, $property)
{
$object = Doctrine::getTable($model)->find($id);
if ($object)
{
return $object->getValue($property);
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment