From c3254b05fbe8038b4a25f0d2f62d13ba15d4b807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de> Date: Thu, 7 Jul 2016 13:51:47 +0200 Subject: [PATCH] refactor: added isCronSetUp() to Cron Manager --- src/QUI/Cron/Manager.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/QUI/Cron/Manager.php b/src/QUI/Cron/Manager.php index f247899..58e30c8 100644 --- a/src/QUI/Cron/Manager.php +++ b/src/QUI/Cron/Manager.php @@ -466,6 +466,25 @@ class Manager )); } + /** + * Checks if a specific cron is already set up + * + * @param string $cron - cron title + * @return bool + */ + public function isCronSetUp($cron) + { + $list = $this->getList(); + + foreach ($list as $entry) { + if ($entry['title'] == $cron) { + return true; + } + } + + return false; + } + /** * Exist the cron? * @@ -546,6 +565,7 @@ class Manager if ($Title->length) { $title = QUI\Utils\DOM::getTextFromNode($Title->item(0)); + \QUI\System\Log::writeRecursive($title); } if ($Desc->length) { -- GitLab