You are here

class BrightcoveTextTrackDeleteQueueWorker in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/QueueWorker/BrightcoveTextTrackDeleteQueueWorker.php \Drupal\brightcove\Plugin\QueueWorker\BrightcoveTextTrackDeleteQueueWorker
  2. 3.x src/Plugin/QueueWorker/BrightcoveTextTrackDeleteQueueWorker.php \Drupal\brightcove\Plugin\QueueWorker\BrightcoveTextTrackDeleteQueueWorker

Processes Entity Delete Tasks for Text Track.

Plugin annotation


@QueueWorker(
  id = "brightcove_text_track_delete_queue_worker",
  title = @Translation("Brightcove text track delete queue worker."),
  cron = { "time" = 30 }
)

Hierarchy

Expanded class hierarchy of BrightcoveTextTrackDeleteQueueWorker

File

src/Plugin/QueueWorker/BrightcoveTextTrackDeleteQueueWorker.php, line 19

Namespace

Drupal\brightcove\Plugin\QueueWorker
View source
class BrightcoveTextTrackDeleteQueueWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition);
  }

  /**
   * {@inheritdoc}
   */
  public function processItem($data) {
    $text_track_entity = BrightcoveTextTrack::loadByTextTrackId($data);
    if (!is_null($text_track_entity)) {
      $text_track_entity
        ->delete();
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BrightcoveTextTrackDeleteQueueWorker::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
BrightcoveTextTrackDeleteQueueWorker::processItem public function Works on a single queue item. Overrides QueueWorkerInterface::processItem
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92