
| Current Path : /var/www/html/wirtschaftsclub.web-klick.de/core/modules/search/src/Plugin/Block/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/wirtschaftsclub.web-klick.de/core/modules/search/src/Plugin/Block/SearchBlock.php |
<?php
namespace Drupal\search\Plugin\Block;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Block\BlockBase;
/**
* Provides a 'Search form' block.
*
* @Block(
* id = "search_form_block",
* admin_label = @Translation("Search form"),
* category = @Translation("Forms")
* )
*/
class SearchBlock extends BlockBase {
/**
* {@inheritdoc}
*/
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'search content');
}
/**
* {@inheritdoc}
*/
public function build() {
return \Drupal::formBuilder()->getForm('Drupal\search\Form\SearchBlockForm');
}
}