removed utils from timebasedfieldupdater

This commit is contained in:
2022-06-05 13:18:08 +01:00
parent c318c451dc
commit 66fa591566
9 changed files with 87 additions and 187 deletions

View File

@ -2,25 +2,21 @@
namespace Drupal\opencase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\opencase\Utils;
final class TimeBasedFieldUpdater {
private EntityTypeManagerInterface $entityTypeManager;
private string $date_field;
private Utils $utils;
private string $entity_type;
private string $date_format;
private string $bundle;
final public function __construct(
EntityTypeManagerInterface $entityTypeManager,
Utils $utils,
string $entity_type, string $bundle, string $date_field, string $date_format = 'Y-m-d'
)
{
$this->entityTypeManager = $entityTypeManager;
$this->utils = $utils;
$this->date_field = $date_field;
$this->date_format = $date_format;
$this->entity_type = $entity_type;