| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/enoikio/modules/webform/src/Element/ |
Upload File : |
<?php
namespace Drupal\webform\Element;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\RenderElement;
/**
* Provides a render element for webform table row.
*
* @FormElement("webform_table_row")
*/
class WebformTableRow extends RenderElement {
/**
* {@inheritdoc}
*/
public function getInfo() {
$class = get_class($this);
return [
'#optional' => FALSE,
'#process' => [
[$class, 'processTableRow'],
],
'#pre_render' => [],
];
}
/**
* Processes a webfrom table row element.
*
* @param array $element
* An associative array containing the properties and children of the
* container.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param array $complete_form
* The complete form structure.
*
* @return array
* The processed element.
*/
public static function processTableRow(&$element, FormStateInterface $form_state, &$complete_form) {
$element['#attributes']['class'][] = 'webform-table-row';
if (!empty($element['#states'])) {
webform_process_states($element);
}
return $element;
}
}