commands-1.x-dev/modules/tasks/src/TaskTypePluginBase.php

modules/tasks/src/TaskTypePluginBase.php
<?php

declare(strict_types=1);

namespace Drupal\tasks;

use Drupal\Component\Plugin\PluginBase;

/**
 * Base class for task_type plugins.
 */
abstract class TaskTypePluginBase extends PluginBase implements TaskTypeInterface {

  /**
   * {@inheritdoc}
   */
  public function label(): string {
    // Cast the label to a string since it is a TranslatableMarkup object.
    return (string) $this->pluginDefinition['label'];
  }

  /**
   * {@inheritdoc}
   */
  public function description(): string {
    return (string) $this->pluginDefinition['description'];
  }

  public function commands(): array {
    return [];
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc