Пример #1
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of PcRepetition (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setId($this->id);
     $copyObj->setHumanExpression($this->human_expression);
     $copyObj->setComputerExpression($this->computer_expression);
     $copyObj->setInitialComputerExpression($this->initial_computer_expression);
     $copyObj->setSpecial($this->special);
     $copyObj->setNeedsParam($this->needs_param);
     $copyObj->setIsParamCardinal($this->is_param_cardinal);
     $copyObj->setMinParam($this->min_param);
     $copyObj->setMaxParam($this->max_param);
     $copyObj->setSortOrder($this->sort_order);
     $copyObj->setHasDividerBelow($this->has_divider_below);
     $copyObj->setIcalRrule($this->ical_rrule);
     $copyObj->setUpdatedAt($this->updated_at);
     $copyObj->setCreatedAt($this->created_at);
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getPcTasks() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcTask($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
 }
Пример #2
0
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of PcList (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false)
 {
     $copyObj->setCreatorId($this->creator_id);
     $copyObj->setTitle($this->title);
     $copyObj->setSortOrder($this->sort_order);
     $copyObj->setIsHeader($this->is_header);
     $copyObj->setIsInbox($this->is_inbox);
     $copyObj->setIsTodo($this->is_todo);
     $copyObj->setUpdatedAt($this->updated_at);
     $copyObj->setCreatedAt($this->created_at);
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getPcTasks() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcTask($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPcUsersListss() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPcUsersLists($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }