Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
cfc06697
Commit
cfc06697
authored
Sep 06, 2012
by
dawehner
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1760322
by dawehner: Improve wizard build_form() docs.
parent
714b3320
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
lib/Drupal/views/Plugin/views/wizard/WizardInterface.php
lib/Drupal/views/Plugin/views/wizard/WizardInterface.php
+13
-2
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
+4
-4
No files found.
lib/Drupal/views/Plugin/views/wizard/WizardInterface.php
View file @
cfc06697
...
...
@@ -21,9 +21,20 @@ interface WizardInterface {
function
__construct
(
array
$definition
);
/**
* For AJAX callbacks to build other elements in the "show" form.
* Form callback to build other elements in the "show" form.
*
* This method builds all form elements beside of the selection of the
* base table.
*
* @param array $form
* The full wizard form array.
* @param array $form_state
* The current state of the wizard form.
*
* @return array
* Returns the changed wizard form.
*/
function
build_form
(
$form
,
&
$form_state
);
function
build_form
(
array
$form
,
array
&
$form_state
);
/**
* Validate form and values.
...
...
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
View file @
cfc06697
...
...
@@ -206,9 +206,9 @@ public function getSorts() {
}
/**
*
Form constructor for the wizard form structure
.
*
Implements Drupal\views\Plugin\views\wizard\WizardInterface::build_form()
.
*/
function
build_form
(
$form
,
&
$form_state
)
{
function
build_form
(
array
$form
,
array
&
$form_state
)
{
$style_options
=
views_fetch_plugin_names
(
'style'
,
'normal'
,
array
(
$this
->
base_table
));
$feed_row_options
=
views_fetch_plugin_names
(
'row'
,
'feed'
,
array
(
$this
->
base_table
));
$path_prefix
=
url
(
NULL
,
array
(
'absolute'
=>
TRUE
));
...
...
@@ -231,7 +231,7 @@ function build_form($form, &$form_state) {
);
// All options for the page display are included in this container so they
// can be hidden
en masse
when the "Create a page" checkbox is unchecked.
// can be hidden
as a group
when the "Create a page" checkbox is unchecked.
$form
[
'displays'
][
'page'
][
'options'
]
=
array
(
'#type'
=>
'container'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'options-set'
)),
...
...
@@ -373,7 +373,7 @@ function build_form($form, &$form_state) {
);
// All options for the block display are included in this container so they
// can be hidden
en masse when the "Create a block
" checkbox is unchecked.
// can be hidden
as a group when the "Create a page
" checkbox is unchecked.
$form
[
'displays'
][
'block'
][
'options'
]
=
array
(
'#type'
=>
'container'
,
'#attributes'
=>
array
(
'class'
=>
array
(
'options-set'
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment