Skip to content

Instantly share code, notes, and snippets.

@odino
Created August 25, 2010 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odino/549473 to your computer and use it in GitHub Desktop.
Save odino/549473 to your computer and use it in GitHub Desktop.
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