/** * Generate a settings form for this handler. * Uses the standard Drupal FAPI. * The element will be attached to the "data" key. * * @return * An array containing any custom form elements to be displayed in the * profile editing form. */ function buildSettingsForm() { // Get the parent settings form. $form = parent::buildSettingsForm(); $form[$this->plugin['name']]['include_unpublished'] = array('#title' => t('Include unpublished nodes'), '#type' => 'checkbox', '#default_value' => isset($this->conf['include_unpublished']) ? $this->conf['include_unpublished'] : 0); return $form; }
/** * Settings for the term plugin. */ function buildSettingsForm() { $form = parent::buildSettingsForm(); // The entity plugin uses the entity name for the #token_types, but terms // is a special case, its name is "Taxonomy_term" and the tokens are defined // (in the taxonomy module) with just "term". if (isset($form[$this->plugin['name']]['token_help']['help']['#token_types'])) { $form[$this->plugin['name']]['token_help']['help']['#token_types'] = array('term'); } return $form; }
/** * Generate a settings form for this handler. * Uses the standard Drupal FAPI. * The element will be attached to the "data" key. * * @return * An array containing any custom form elements to be displayed in the * profile editing form. */ function buildSettingsForm() { $form = parent::buildSettingsForm(); $form['entity:file']['show_scheme'] = array('#title' => t('Show file scheme'), '#type' => 'checkbox', '#default_value' => isset($this->conf['show_scheme']) ? $this->conf['show_scheme'] : array()); $form['entity:file']['group_by_scheme'] = array('#title' => t('Group files by scheme'), '#type' => 'checkbox', '#default_value' => isset($this->conf['group_by_scheme']) ? $this->conf['group_by_scheme'] : array()); $image_extra_info_options = array('thumbnail' => t('Show thumbnails <em>(using the image style !linkit_thumb_link)</em>', array('!linkit_thumb_link' => l('linkit_thumb', 'admin/config/media/image-styles/edit/linkit_thumb'))), 'dimensions' => t('Show pixel dimensions')); $form['entity:file']['image_extra_info'] = array('#title' => t('Images'), '#type' => 'checkboxes', '#options' => $image_extra_info_options, '#default_value' => isset($this->conf['image_extra_info']) ? $this->conf['image_extra_info'] : array('thumbnail', 'dimensions')); return $form; }