public function WebformCard::prepare in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_cards/src/Plugin/WebformElement/WebformCard.php \Drupal\webform_cards\Plugin\WebformElement\WebformCard::prepare()
Prepare an element to be rendered within a webform.
Parameters
array $element: An element.
\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission. Webform submission is optional since it is not used by composite sub elements.
Overrides ContainerBase::prepare
See also
\Drupal\webform\Element\WebformCompositeBase::processWebformComposite
File
- modules/
webform_cards/ src/ Plugin/ WebformElement/ WebformCard.php, line 69
Class
- WebformCard
- Provides a 'card' element.
Namespace
Drupal\webform_cards\Plugin\WebformElementCode
public function prepare(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
parent::prepare($element, $webform_submission);
if (empty($element['#title_tag'])) {
$element['#title_tag'] = $this
->getDefaultProperty('title_tag');
}
}