Changeset 24162
- Timestamp:
- 11/18/09 23:05:38 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/csDoctrineActAsAttachablePlugin/branches/1.4/lib/model/doctrine/PluginAttachment.class.php
r23869 r24162 8 8 public function __toString() 9 9 { 10 return $this->name;10 return $this->name; 11 11 } 12 12 13 public function getObject() 13 14 { 14 15 return Doctrine::getTable($this->getObjectClass())->findOneById($this->getObjectId()); 15 16 } 17 16 18 public function getDefaultFilepath() 17 19 { 18 sfLoader::loadHelpers('Url'); 20 sfContext::getInstance()->getConfiguration()->loadHelpers('Url'); 21 19 22 return public_path($this->getUploadPath()); 20 23 } 24 21 25 public function getUploadPath() 22 26 { 23 return 'uploads/' .strtolower($this->getObjectClass()).'/'.$this->getUrl();27 return 'uploads/' . strtolower($this->getObjectClass()) . '/' . $this->getUrl(); 24 28 } 29 25 30 public function getAttachmentRoute() 26 31 {