Same filename and directory in other branches
- 5.0.x src/Form/AdvaggFormBase.php
- 6.0.x src/Form/AdvaggFormBase.php
- 8.x-3.x src/Form/AdvaggFormBase.php
- 8.x-4.x src/Form/AdvaggFormBase.php
Namespace
Drupal\advagg\Form
Fichier
-
src/Form/AdvaggFormBase.php
View source
<?php
namespace Drupal\advagg\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormBuilderInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
abstract class AdvaggFormBase extends ConfigFormBase {
protected $advaggFiles;
protected $advaggAggregates;
protected $requestStack;
public function __construct(ConfigFactoryInterface $config_factory, StateInterface $advagg_files, StateInterface $advagg_aggregates, RequestStack $request_stack) {
parent::__construct($config_factory);
$this->advaggFiles = $advagg_files;
$this->advaggAggregates = $advagg_aggregates;
$this->requestStack = $request_stack;
}
public static function create(ContainerInterface $container) {
return new static($container->get('config.factory'), $container->get('state.advagg.files'), $container->get('state.advagg.aggregates'), $container->get('request_stack'));
}
protected function isAjax() {
$request = $this->requestStack
->getCurrentRequest();
if ($request->query
->has(FormBuilderInterface::AJAX_FORM_REQUEST)) {
return TRUE;
}
return FALSE;
}
}
Classes
| Titre |
Deprecated |
Résumé |
| AdvaggFormBase |
|
View AdvAgg information for this site. |