--- scheduler.module.21 2016-04-08 21:28:12.000000000 +0100 +++ scheduler.module 2016-04-08 22:02:11.000000000 +0100 @@ -298,7 +298,7 @@ if ($node->publish_on->value > 0) { // Check that other modules allow the action on this node. - $publication_allowed = \Drupal::service('scheduler.authorizer')->isAllowed($node, 'publish'); + $publication_allowed = \Drupal::service('scheduler.manager')->isAllowed($node, 'publish'); // Publish the node immediately if the publication date is in the past. $publish_immediately = $entity->getThirdPartySetting('scheduler', 'publish_past_date', SCHEDULER_DEFAULT_PUBLISH_PAST_DATE) == 'publish'; --- scheduler.services.yml.21 2016-04-08 21:28:12.000000000 +0100 +++ scheduler.services.yml 2016-04-08 22:02:11.000000000 +0100 @@ -1,4 +1,8 @@ services: scheduler.manager: - class: Drupal\scheduler\Manager + class: Drupal\scheduler\SchedulerManager arguments: ['@date.formatter', '@logger.channel.scheduler', '@module_handler', '@entity.manager', '@config.factory' ] + logger.channel.scheduler: + class: Drupal\Core\Logger\LoggerChannel + factory: logger.factory:get + arguments: ['scheduler'] --- src/SchedulerManager.php.21 2016-04-08 21:28:12.000000000 +0100 +++ src/SchedulerManager.php 2016-04-08 22:02:11.000000000 +0100 @@ -92,7 +92,7 @@ $action = 'publish'; // Allow other modules to add to the list of nodes to be published. - $nids = array_unique(array_merge($nids, _scheduler_scheduler_nid_list($action))); + $nids = array_unique(array_merge($nids, $this->nidList($action))); // Allow other modules to alter the list of nodes to be published. $this->moduleHandler->alter('scheduler_nid_list', $nids, $action); @@ -180,6 +180,7 @@ * Unpublish scheduled nodes. * * @return bool + * TRUE if any node has been unpublished, FALSE otherwise. * * @throws \Drupal\scheduler\Plugin\Exception\SchedulerMissingDateException * @throws \Drupal\scheduler\Plugin\Exception\SchedulerNodeTypeNotEnabledException @@ -198,7 +199,7 @@ $action = 'unpublish'; // Allow other modules to add to the list of nodes to be unpublished. - $nids = array_unique(array_merge($nids, _scheduler_scheduler_nid_list($action))); + $nids = array_unique(array_merge($nids, $this->nidList($action))); // Allow other modules to alter the list of nodes to be unpublished. $this->moduleHandler->alter('scheduler_nid_list', $nids, $action); @@ -267,7 +268,7 @@ $this->logger->notice('@type: scheduled unpublishing of %title.', $logger_variables); // Use the actions system to publish the node. - $this->moduleHandler->getStorage('action')->load('node_unpublish_action')->getPlugin()->execute($node); + $this->entityManager->getStorage('action')->load('node_unpublish_action')->getPlugin()->execute($node); // Invoke event to tell Rules that Scheduler has unpublished this node. if ($this->moduleHandler->moduleExists('rules')) {