public function HijriFormatter::__construct in Hijri 8.2
Same name and namespace in other branches
- 3.0.x src/HijriFormatter.php \Drupal\hijri\HijriFormatter::__construct()
- 1.0.x src/HijriFormatter.php \Drupal\hijri\HijriFormatter::__construct()
Constructs a Hijri object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
Overrides DateFormatter::__construct
File
- src/
HijriFormatter.php, line 92
Class
- HijriFormatter
- Provides a service to handle Hijri date related functionality.
Namespace
Drupal\hijriCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, TranslationInterface $translation, ConfigFactoryInterface $config_factory, RequestStack $request_stack) {
$this->dateFormatStorage = $entity_type_manager
->getStorage('date_format');
$this->languageManager = $language_manager;
$this->stringTranslation = $translation;
$this->configFactory = $config_factory;
$this->requestStack = $request_stack;
}