/** * Wrapper to access Activity description. * * @return string */ public function getDescription() { if (!empty($this->activity) && ' ' !== $this->activity->getDescription()) { return $this->activity->getDescription(); } return ''; }
/** * Copy an activity. */ public function copyActivity(Activity $resource) { $activity = new Activity(); $activity->setTitle($resource->getTitle()); $activity->setDescription($resource->getDescription()); $activity->setParameters($this->copyParameters($resource)); if ($primaryResource = $resource->getPrimaryResource()) { $activity->setPrimaryResource($primaryResource); } return $activity; }