diff --git a/src/Controller/TermRevisionController.php b/src/Controller/TermRevisionController.php index 4517e43ef0982b5498b39ad15a8395bfedc60b2c..437527ecd05c5f64bd93eb994b5a508e852cc41c 100644 --- a/src/Controller/TermRevisionController.php +++ b/src/Controller/TermRevisionController.php @@ -91,7 +91,20 @@ class TermRevisionController extends ControllerBase { protected DateFormatterInterface $dateFormatter; /** - * {@inheritdoc} + * Constructs a new TermRevisionController. + * + * @param \Drupal\Core\Database\Connection $database + * Database connection. + * @param \Drupal\user\UserStorageInterface $user_storage + * User storage. + * @param \Drupal\taxonomy\TermStorageInterface $term_storage + * Term storage. + * @param \Drupal\Core\Entity\EntityRepository $entity_repository + * Entity repository. + * @param \Drupal\Core\Entity\EntityViewBuilderInterface $term_view_builder + * Term view builder. + * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter + * Date formatter. */ public function __construct(Connection $database, UserStorageInterface $user_storage, TermStorageInterface $term_storage, EntityRepository $entity_repository, EntityViewBuilderInterface $term_view_builder, DateFormatterInterface $date_formatter) { $this->database = $database; diff --git a/src/Form/TermRevisionDeleteForm.php b/src/Form/TermRevisionDeleteForm.php index 3bc9a4fe04f95deb1d6e78b9f6e8f01f6295631d..25ba3bf0d27f30dfb0fa99a83b02e885059c186d 100644 --- a/src/Form/TermRevisionDeleteForm.php +++ b/src/Form/TermRevisionDeleteForm.php @@ -23,21 +23,21 @@ class TermRevisionDeleteForm extends ConfirmFormBase { * * @var string */ - protected $id; + protected string $id; /** * The entity id. * * @var string */ - protected $entityId; + protected string $entityId; /** * The database connection. * * @var \Drupal\Core\Database\Connection */ - protected $database; + protected Connection $database; /** * The logger instance. @@ -51,10 +51,17 @@ class TermRevisionDeleteForm extends ConfirmFormBase { * * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ - protected $entityTypeManager; + protected EntityTypeManagerInterface $entityTypeManager; /** - * Constructor. + * Constructs a new TermRevisionDeleteForm. + * + * @param \Drupal\Core\Database\Connection $database + * Database connection. + * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory + * Logger factory. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * Entity type manager. */ public function __construct(Connection $database, LoggerChannelFactoryInterface $logger_factory, EntityTypeManagerInterface $entity_type_manager) { $this->database = $database; diff --git a/src/Form/TermRevisionRevertForm.php b/src/Form/TermRevisionRevertForm.php index a0fc8deeba40adf414788d488ab374971b82e3f1..0252449320ff2c0c709aae1f83e7fef33cca20cd 100644 --- a/src/Form/TermRevisionRevertForm.php +++ b/src/Form/TermRevisionRevertForm.php @@ -2,14 +2,14 @@ namespace Drupal\taxonomy_term_revision\Form; -use Drupal\Component\Datetime\Time; +use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Database\Connection; -use Drupal\Core\Datetime\DateFormatter; -use Drupal\Core\Entity\EntityTypeManager; +use Drupal\Core\Datetime\DateFormatterInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Logger\LoggerChannelFactoryInterface; -use Drupal\Core\Session\AccountProxy; +use Drupal\Core\Session\AccountProxyInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\Core\Url; use Drupal\taxonomy\TermInterface; @@ -26,21 +26,21 @@ class TermRevisionRevertForm extends ConfirmFormBase { * * @var string */ - protected $id; + protected string $id; /** * The entity id. * * @var string */ - protected $entityId; + protected string $entityId; /** * The database connection. * * @var \Drupal\Core\Database\Connection */ - protected $database; + protected Connection $database; /** * The logger instance. @@ -52,35 +52,48 @@ class TermRevisionRevertForm extends ConfirmFormBase { /** * The time details. * - * @var \Drupal\Component\Datetime\Time + * @var \Drupal\Component\Datetime\TimeInterface */ - protected $time; + protected TimeInterface $time; /** * The entity type manager. * - * @var \Drupal\Core\Entity\EntityTypeManager + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ - protected $entityTypeManager; + protected EntityTypeManagerInterface $entityTypeManager; /** * User definition. * - * @var \Drupal\Core\Session\AccountProxy + * @var \Drupal\Core\Session\AccountProxyInterface */ - protected $currentUser; + protected AccountProxyInterface $currentUser; /** * The date formatter. * - * @var \Drupal\Core\Datetime\DateFormatter + * @var \Drupal\Core\Datetime\DateFormatterInterface */ - protected $dateFormatter; + protected DateFormatterInterface $dateFormatter; /** - * Constructor. - */ - public function __construct(Connection $database, LoggerChannelFactoryInterface $loggerFactory, Time $time, EntityTypeManager $entityTypeManager, AccountProxy $current_user, DateFormatter $date_formatter) { + * Constructs a new TermRevisionRevertForm. + * + * @param \Drupal\Core\Database\Connection $database + * Database connection. + * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory + * Logger factory. + * @param \Drupal\Component\Datetime\TimeInterface $time + * Time service. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager + * Entity type manager. + * @param \Drupal\Core\Session\AccountProxyInterface $current_user + * Current user. + * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter + * Date formatter. + */ + public function __construct(Connection $database, LoggerChannelFactoryInterface $loggerFactory, TimeInterface $time, EntityTypeManagerInterface $entityTypeManager, AccountProxyInterface $current_user, DateFormatterInterface $date_formatter) { $this->database = $database; $this->loggerFactory = $loggerFactory; $this->time = $time; diff --git a/taxonomy_term_revision.info.yml b/taxonomy_term_revision.info.yml index 0590dc804b25950126d6a356e314a4a3d71246c7..3ad5479af80f9a71a308a22b3d3895b3054d63e5 100644 --- a/taxonomy_term_revision.info.yml +++ b/taxonomy_term_revision.info.yml @@ -4,8 +4,8 @@ description: 'Allows user to revert or delete taxonomy term revisions.' type: module package: revision -core_version_requirement: ^8 || ^9 || ^10 || ^11 +core_version_requirement: ^8.8 || ^9 || ^10 || ^11 dependencies: - - drupal:system (>= 8.7) - - drupal:taxonomy (>=8.7) + - drupal:system (>= 8.8) + - drupal:taxonomy (>=8.8) diff --git a/taxonomy_term_revision.module b/taxonomy_term_revision.module index 1b640f00b11d41d5a5c9d563ae329ed84fdc9406..d2ab4f6c70fc3f9845dd892c5a0de7b6e68a0ca5 100644 --- a/taxonomy_term_revision.module +++ b/taxonomy_term_revision.module @@ -2,7 +2,7 @@ /** * @file - * Taxonomy Term Revision module. + * Drupal Module: Taxonomy Term Revision. */ use Drupal\Core\Entity\EntityInterface;