private static function getTimeInfo(ScheduledPublishing $sp) { $time_to_publish = $sp->getTimeToPublish(); $publish_interval_hours = $sp->getPublishIntervalHours(); $publish_days_of_week = $sp->getPublishDaysOfWeek(); $cron_expression = $sp->getCronExpression(); $time_expression = ""; if (isset($publish_days_of_week) && sizeof($publish_days_of_week)) { $time_expression = "every "; $days = $publish_days_of_week->dayOfWeek; if (is_array($days)) { foreach ($days as $day) { $time_expression .= $day . ", "; } } $time_expression .= "at " . $time_to_publish; } else { if (isset($publish_interval_hours)) { $time_expression = "every {$publish_interval_hours} hours"; } else { if (isset($cron_expression)) { $time_expression = $cron_expression; } } } return $time_expression; }
public function __construct(aohs\AssetOperationHandlerService $service, \stdClass $identifier) { parent::__construct($service, $identifier); // store publish set info $this->processPublishableAssetIdentifiers(); }