You are here

class FlexiformElementField_taxonomy_term_reference in Flexiform 7

Class for taxonomy term reference Field API elements.

Hierarchy

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

Namesort descending Modifiers Type Description Overrides
FlexiformElement::$bundle protected property The bundle this is on.
FlexiformElement::$element_namespace protected property The namespace of this element.
FlexiformElement::$entity_namespace protected property The entity namespace of the entity this element is acting on.
FlexiformElement::$entity_type protected property The entity type this field is on.
FlexiformElement::$flexiform protected property The flexiform entity this element is one.
FlexiformElement::$settings protected property The settings for this element.
FlexiformElement::$weight protected property The weight of this element.
FlexiformElement::createElement public static function Create an element object.
FlexiformElement::getCtoolsContexts public function Get an array of ctools context for the flexiform.
FlexiformElement::getCtoolsSubstitutionsList public function Build a list of possible ctools substitutions.
FlexiformElement::getElement public static function Get an element object.
FlexiformElement::getElementNamespace public function Get the element namespace for this form element.
FlexiformElement::getEntityNamespace public function Get the entity namespace for this form element.
FlexiformElement::getEntityType public function Get the entity type for this element.
FlexiformElement::getSettings public function Get the settings.
FlexiformElement::getWeight public function Get the weight of this form element.
FlexiformElement::makeElementNamespace public function Make namespace for the element. 1
FlexiformElement::name public function Get the name for this form element.
FlexiformElement::removeForm public function Build the remove form for the element.
FlexiformElement::removeFormSubmit public function Submit the remove form for the element.
FlexiformElement::removeFormValidate public function Validate the remove form for the element.
FlexiformElement::replaceCtoolsSubstitutions public function Replace ctools substitutions with their values.
FlexiformElementField::$field protected property The field settings for the field.
FlexiformElementField::$field_name protected property The field name of the field.
FlexiformElementField::$instance protected property The instance settings for the field
FlexiformElementField::checkWidgetBehavior public function Check widget behavior.
FlexiformElementField::configureFieldSettingsForm public function Add the Field Settings section to the config form.
FlexiformElementField::configureFormSubmit public function Overrides FlexiformElement::configureFormSubmit(). Overrides FlexiformElement::configureFormSubmit
FlexiformElementField::configureFormValidate public function Overrides FlexiformElement::configureFormValidate(). Overrides FlexiformElement::configureFormValidate
FlexiformElementField::diffArrays public function Get the Difference of two settings arrays.
FlexiformElementField::extractFormElements function Extract the form element from $form and give it the correct key.
FlexiformElementField::fieldInvoke protected function Invoke field hooks on a specific field.
FlexiformElementField::fieldInvokeDefault protected function Invoke default field hooks on this element.
FlexiformElementField::form public function Return the form element for this FlexiformElement. Overrides FlexiformElement::form 2
FlexiformElementField::formExtractValues function Overrides FlexiformElement::formExtractValues(). Overrides FlexiformElement::formExtractValues
FlexiformElementField::formIsEmpty function Overrides FlexiformElement::formIsEmpty(). Overrides FlexiformElement::formIsEmpty
FlexiformElementField::formSubmit function Submit callback for this form. Overrides FlexiformElement::formSubmit 1
FlexiformElementField::formValidate public function Validate this element. Overrides FlexiformElement::formValidate
FlexiformElementField::getField public function Get the field array. Overrides FlexiformElementFieldAPIInterface::getField
FlexiformElementField::getInstance public function Get the instance array. Overrides FlexiformElementFieldAPIInterface::getInstance
FlexiformElementField::getWidgetLabel public function Get the widget label from the instance settings.
FlexiformElementField::getWidgetType public function Get the widget type from the instance settings.
FlexiformElementField::label public function Overrides FlexiformElement::label(). Overrides FlexiformElement::label
FlexiformElementField::setLabel public function Overrides FlexiformElement::setLabel(). Overrides FlexiformElement::setLabel
FlexiformElementField::setWeight public function Set the weight of this form element. Overrides FlexiformElement::setWeight
FlexiformElementField::toSettingsArray public function Overrides FlexifromElement::toSettingsArray(); Overrides FlexiformElement::toSettingsArray
FlexiformElementField::type public function Return the type. Overrides FlexiformElement::type
FlexiformElementField::__construct public function Overrides FlexiformElement::__construct(). Overrides FlexiformElement::__construct
FlexiformElementField_taxonomy_term_reference::configureForm public function Overrides FlexiformElement::configureForm(). Overrides FlexiformElementField::configureForm