Issue #2803923 by gianani, shashikant_chauhan, joachim: Table render element docs don't explain how to do colspan

8.3.x
Alex Pott 2016-10-25 13:19:43 -07:00
parent 5c4a8dfbe6
commit af89f803d0
1 changed files with 7 additions and 1 deletions

View File

@ -33,7 +33,8 @@ use Drupal\Component\Utility\Html as HtmlUtility;
* '#header' => array($this->t('Name'), $this->t('Phone')),
* );
*
* for ($i=1; $i<=4; $i++) {
* for ($i = 1; $i <= 4; $i++) {
* $form['contacts'][$i]['#attributes'] = array('class' => array('foo', 'baz'));
* $form['contacts'][$i]['name'] = array(
* '#type' => 'textfield',
* '#title' => $this->t('Name'),
@ -46,6 +47,11 @@ use Drupal\Component\Utility\Html as HtmlUtility;
* '#title_display' => 'invisible',
* );
* }
*
* $form['contacts'][]['colspan_example'] = array(
* '#plain_text' => 'Colspan Example',
* '#wrapper_attributes' => array('colspan' => 2, 'class' => array('foo', 'bar')),
* );
* @endcode
* @see \Drupal\Core\Render\Element\Tableselect
*