コード例 #1
0
 public function getHook($entity, $mode = Hook::MODE_DEFAULT)
 {
     // If Action has not been created yet, return null for Hook.
     if (!$entity->getId()) {
         return null;
     }
     $hook = new DateRepeat();
     $hook->setStartDate($entity->getStartDate());
     $hook->setEndDate($entity->getEndDate());
     $hook->setIntervalStartDate($entity->getIntervalStartDate());
     $hook->setInterval($entity->getInterval());
     $hook->setIntervalNextRun($entity->getIntervalNextRun());
     $hook->setIntervalEndOccurrence($entity->getIntervalEndOccurrence());
     $hook->setIntervalEndDate($entity->getIntervalEndDate());
     return $hook;
 }