public function FlexiformElement::form in Flexiform 7
Get the form element.
14 calls to FlexiformElement::form()
- FlexiformElementCtoolsContent::form in includes/
element/ ctools_content.element.inc - Returns the custom html that is defined in the configure form.
- FlexiformElementCustomHtml::form in includes/
element/ custom_html.element.inc - Returns the custom html that is defined in the configure form.
- FlexiformElementEntityProperty::form in includes/
element/ property.element.inc - Return the form element for this FlexiformElement.
- FlexiformElementField::form in includes/
element/ field.element.inc - Return the form element for this FlexiformElement.
- FlexiformElementFlexiform::form in includes/
element/ flexiform.element.inc - Overrides FlexiformElement::form().
15 methods override FlexiformElement::form()
- FlexiformElementBroken::form in includes/
element/ broken.element.inc - Return the form element for this FlexiformElement.
- FlexiformElementCtoolsContent::form in includes/
element/ ctools_content.element.inc - Returns the custom html that is defined in the configure form.
- FlexiformElementCustomHtml::form in includes/
element/ custom_html.element.inc - Returns the custom html that is defined in the configure form.
- FlexiformElementEntityProperty::form in includes/
element/ property.element.inc - Return the form element for this FlexiformElement.
- FlexiformElementField::form in includes/
element/ field.element.inc - Return the form element for this FlexiformElement.
File
- includes/
flexiform.element.inc, line 291 - Controller class for flexiform elements.
Class
- FlexiformElement
- Base class for all FlexiformElements
Code
public function form($form, &$form_state, $entity) {
$form[$this->element_namespace]['#weight'] = $this
->getWeight();
$form[$this->element_namespace]['#flexiform'] = $this->flexiform;
$form[$this->element_namespace]['#flexiform_element'] = $this;
if (!empty($form[$this->element_namespace]['#title']) && !empty($this->settings['display_options']['hide_label'])) {
$form[$this->element_namespace]['#title_display'] = 'invisible';
}
if (!empty($form[$this->element_namespace]['#type']) && !empty($this->settings['display_options']['hide_element'])) {
$form[$this->element_namespace]['#access'] = FALSE;
}
if (!empty($this->settings['display_options']['css'])) {
foreach (explode(' ', $this->settings['display_options']['css']) as $class) {
$form[$this->element_namespace]['#attributes']['class'][] = $class;
}
}
return $form;
}