class FlexiformElementField_taxonomy_term_reference in Flexiform 7
Class for taxonomy term reference Field API elements.
Hierarchy
- class \FlexiformElement implements FlexiformElementInterface
- class \FlexiformElementField implements FlexiformElementFieldAPIInterface
Expanded class hierarchy of FlexiformElementField_taxonomy_term_reference
File
- includes/
element/ fields/ taxonomy_term_reference.inc, line 10 - Contains FlexiformElementField_taxonomy_term_reference class.
View source
class FlexiformElementField_taxonomy_term_reference extends FlexiformElementField {
/**
* {@inheritdoc}
*/
public function configureForm($form, &$form_state, $flexiform) {
$form = parent::configureForm($form, $form_state, $flexiform);
// Expose the parent term field setting.
$field = $this
->getField();
$form['field']['settings']['allowed_values'][0]['parent'] = array(
'#type' => 'select',
'#title' => t('Parent term'),
'#options' => taxonomy_options_list(field_info_field($this->field_name), NULL, NULL, NULL),
'#default_value' => isset($field['settings']['allowed_values'][0]['parent']) ? $field['settings']['allowed_values'][0]['parent'] : 0,
'#empty_value' => 0,
);
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FlexiformElement:: |
protected | property | The bundle this is on. | |
FlexiformElement:: |
protected | property | The namespace of this element. | |
FlexiformElement:: |
protected | property | The entity namespace of the entity this element is acting on. | |
FlexiformElement:: |
protected | property | The entity type this field is on. | |
FlexiformElement:: |
protected | property | The flexiform entity this element is one. | |
FlexiformElement:: |
protected | property | The settings for this element. | |
FlexiformElement:: |
protected | property | The weight of this element. | |
FlexiformElement:: |
public static | function | Create an element object. | |
FlexiformElement:: |
public | function | Get an array of ctools context for the flexiform. | |
FlexiformElement:: |
public | function | Build a list of possible ctools substitutions. | |
FlexiformElement:: |
public static | function | Get an element object. | |
FlexiformElement:: |
public | function | Get the element namespace for this form element. | |
FlexiformElement:: |
public | function | Get the entity namespace for this form element. | |
FlexiformElement:: |
public | function | Get the entity type for this element. | |
FlexiformElement:: |
public | function | Get the settings. | |
FlexiformElement:: |
public | function | Get the weight of this form element. | |
FlexiformElement:: |
public | function | Make namespace for the element. | 1 |
FlexiformElement:: |
public | function | Get the name for this form element. | |
FlexiformElement:: |
public | function | Build the remove form for the element. | |
FlexiformElement:: |
public | function | Submit the remove form for the element. | |
FlexiformElement:: |
public | function | Validate the remove form for the element. | |
FlexiformElement:: |
public | function | Replace ctools substitutions with their values. | |
FlexiformElementField:: |
protected | property | The field settings for the field. | |
FlexiformElementField:: |
protected | property | The field name of the field. | |
FlexiformElementField:: |
protected | property | The instance settings for the field | |
FlexiformElementField:: |
public | function | Check widget behavior. | |
FlexiformElementField:: |
public | function | Add the Field Settings section to the config form. | |
FlexiformElementField:: |
public | function |
Overrides FlexiformElement::configureFormSubmit(). Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Overrides FlexiformElement::configureFormValidate(). Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function | Get the Difference of two settings arrays. | |
FlexiformElementField:: |
function | Extract the form element from $form and give it the correct key. | ||
FlexiformElementField:: |
protected | function | Invoke field hooks on a specific field. | |
FlexiformElementField:: |
protected | function | Invoke default field hooks on this element. | |
FlexiformElementField:: |
public | function |
Return the form element for this FlexiformElement. Overrides FlexiformElement:: |
2 |
FlexiformElementField:: |
function |
Overrides FlexiformElement::formExtractValues(). Overrides FlexiformElement:: |
||
FlexiformElementField:: |
function |
Overrides FlexiformElement::formIsEmpty(). Overrides FlexiformElement:: |
||
FlexiformElementField:: |
function |
Submit callback for this form. Overrides FlexiformElement:: |
1 | |
FlexiformElementField:: |
public | function |
Validate this element. Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Get the field array. Overrides FlexiformElementFieldAPIInterface:: |
|
FlexiformElementField:: |
public | function |
Get the instance array. Overrides FlexiformElementFieldAPIInterface:: |
|
FlexiformElementField:: |
public | function | Get the widget label from the instance settings. | |
FlexiformElementField:: |
public | function | Get the widget type from the instance settings. | |
FlexiformElementField:: |
public | function |
Overrides FlexiformElement::label(). Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Overrides FlexiformElement::setLabel(). Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Set the weight of this form element. Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Overrides FlexifromElement::toSettingsArray(); Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Return the type. Overrides FlexiformElement:: |
|
FlexiformElementField:: |
public | function |
Overrides FlexiformElement::__construct(). Overrides FlexiformElement:: |
|
FlexiformElementField_taxonomy_term_reference:: |
public | function |
Overrides FlexiformElement::configureForm(). Overrides FlexiformElementField:: |