Fixed "new static" is unsafe
This commit is contained in:
parent
0c2504c4c7
commit
9557ca17d5
7 changed files with 9 additions and 6 deletions
|
|
@ -40,7 +40,8 @@ function advanced_search_theme() {
|
|||
function advanced_search_library_info_alter(&$libraries, $extension) {
|
||||
if ($extension == 'facets') {
|
||||
// Override facets module javascript with customizations.
|
||||
$path = '/' . drupal_get_path('module', 'advanced_search') . '/js/facets';
|
||||
// https://www.drupal.org/node/2940438
|
||||
$path = '/' . \Drupal::service('extension.list.module')->getPath('advanced_search') . '/js/facets';
|
||||
$libraries['soft-limit']['js'] = [
|
||||
"$path/soft-limit.js" => [],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class AjaxBlocksController extends ControllerBase {
|
|||
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
||||
* The drupal container.
|
||||
*/
|
||||
public function __construct(RendererInterface $renderer, CurrentPathStack $currentPath, RouterInterface $router, PathProcessorManager $pathProcessor, CurrentRouteMatch $currentRouteMatch, ContainerInterface $container) {
|
||||
final public function __construct(RendererInterface $renderer, CurrentPathStack $currentPath, RouterInterface $router, PathProcessorManager $pathProcessor, CurrentRouteMatch $currentRouteMatch, ContainerInterface $container) {
|
||||
$this->storage = $this->entityTypeManager()->getStorage('block');
|
||||
$this->renderer = $renderer;
|
||||
$this->currentPath = $currentPath;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class AdvancedSearchForm extends FormBase {
|
|||
/**
|
||||
* Class constructor.
|
||||
*/
|
||||
public function __construct(Request $request, RouteMatchInterface $current_route_match) {
|
||||
final public function __construct(Request $request, RouteMatchInterface $current_route_match) {
|
||||
$this->request = $request;
|
||||
$this->currentRouteMatch = $current_route_match;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SettingsForm extends ConfigFormBase {
|
|||
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
|
||||
* The factory for configuration objects.
|
||||
*/
|
||||
public function __construct(ConfigFactoryInterface $config_factory) {
|
||||
final public function __construct(ConfigFactoryInterface $config_factory) {
|
||||
$this->setConfigFactory($config_factory);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class AdvancedSearchBlock extends BlockBase implements ContainerFactoryPluginInt
|
|||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* A request object for the current request.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, DisplayPluginManager $display_plugin_manager, FormBuilderInterface $form_builder, Request $request) {
|
||||
final public function __construct(array $configuration, $plugin_id, $plugin_definition, DisplayPluginManager $display_plugin_manager, FormBuilderInterface $form_builder, Request $request) {
|
||||
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
||||
$this->displayPluginManager = $display_plugin_manager;
|
||||
list($view_id, $display_id) = preg_split('/__/', $this->getDerivativeId(), 2);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ abstract class SearchApiDisplayBlockDeriver implements ContainerDeriverInterface
|
|||
*/
|
||||
abstract protected function label();
|
||||
|
||||
final public function __construct (ContainerInterface $container, $base_plugin_id) {}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class SearchResultsPagerBlock extends BlockBase implements ContainerFactoryPlugi
|
|||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* A request object for the current request.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, Request $request) {
|
||||
final public function __construct(array $configuration, $plugin_id, $plugin_definition, Request $request) {
|
||||
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
||||
$this->request = clone $request;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue