ViewsTestDataElementEmbedForm.php
Same filename in other branches
Namespace
Drupal\views_test_data\FormFile
-
core/
modules/ views/ tests/ modules/ views_test_data/ src/ Form/ ViewsTestDataElementEmbedForm.php
View source
<?php
declare (strict_types=1);
namespace Drupal\views_test_data\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Simple form page callback to test the view element.
*
* @internal
*/
class ViewsTestDataElementEmbedForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'views_test_data_element_embed_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form['view'] = [
'#type' => 'view',
'#name' => 'test_view_embed',
'#display_id' => 'embed_1',
'#arguments' => [
25,
],
'#embed' => TRUE,
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ViewsTestDataElementEmbedForm | Simple form page callback to test the view element. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.