Esempio n. 1
0
 public function getItemsFromRequest($array)
 {
     $items = array();
     foreach ($array as $id) {
         $j = \Concrete\Core\Job\Job::getByID($id);
         if (is_object($j)) {
             $job = new \PortlandLabs\Concrete5\MigrationTool\Entity\Export\Job();
             $job->setItemId($j->getJobID());
             $items[] = $job;
         }
     }
     return $items;
 }
Esempio n. 2
0
 /**
  * @return Job[]
  */
 public function getJobs()
 {
     $db = Loader::db();
     $r = $db->Execute('select jID from JobSetJobs where jsID = ? order by jID asc', $this->getJobSetId());
     $jobs = array();
     while ($row = $r->FetchRow()) {
         $j = Job::getByID($row['jID']);
         if (is_object($j)) {
             $jobs[] = $j;
         }
     }
     return $jobs;
 }