''); $options['link-1']['path-1'] = array('default' => ''); $options['link-2']['label-2'] = array('default' => ''); $options['link-2']['path-2'] = array('default' => ''); $options['link-3']['label-3'] = array('default' => ''); $options['link-3']['path-3'] = array('default' => ''); $options['link-4']['label-4'] = array('default' => ''); $options['link-4']['path-4'] = array('default' => ''); return $options; } /** * {@inheritdoc} */ function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); $form['label']['#default_value'] = 'Action Links'; $form['link-1'] = array( '#type' => 'fieldset', '#title' => t('Link #1') ); $form['link-1']['label-1'] = array( '#type' => 'textfield', '#title' => t('Label'), '#description' => t('The text that will be displayed as the link'), '#default_value' => $this->options['link-1']['label-1'], ); $form['link-1']['path-1'] = array( '#type' => 'textfield', '#title' => t('URL'), '#description' => t('The path that the link will link to'), '#default_value' => $this->options['link-1']['path-1'] ); $form['link-2'] = array( '#type' => 'fieldset', '#title' => t('Link #2') ); $form['link-2']['label-2'] = array( '#type' => 'textfield', '#title' => t('Label'), '#description' => t('The text that will be displayed as the link'), '#default_value' => $this->options['link-2']['label-2'], ); $form['link-2']['path-2'] = array( '#type' => 'textfield', '#title' => t('URL'), '#description' => t('The path that the link will link to'), '#default_value' => $this->options['link-2']['path-2'] ); $form['link-3'] = array( '#type' => 'fieldset', '#title' => t('Link #3') ); $form['link-3']['label-3'] = array( '#type' => 'textfield', '#title' => t('Label'), '#description' => t('The text that will be displayed as the link'), '#default_value' => $this->options['link-3']['label-3'], ); $form['link-3']['path-3'] = array( '#type' => 'textfield', '#title' => t('URL'), '#description' => t('The path that the link will link to'), '#default_value' => $this->options['link-3']['path-3'] ); $form['link-4'] = array( '#type' => 'fieldset', '#title' => t('Link #4') ); $form['link-4']['label-4'] = array( '#type' => 'textfield', '#title' => t('Label'), '#description' => t('The text that will be displayed as the link'), '#default_value' => $this->options['link-4']['label-4'], ); $form['link-4']['path-4'] = array( '#type' => 'textfield', '#title' => t('URL'), '#description' => t('The path that the link will link to'), '#default_value' => $this->options['link-4']['path-4'] ); } /** * {@inheritdoc} */ function options_submit(&$form, &$form_state) { parent::options_submit($form, $form_state); //ddl($form_state, 'form state in submit'); $this->options['link-1']['label-1'] = $form_state['values']['options']['link-1']['label-1']; $this->options['link-1']['path-1'] = $form_state['values']['options']['link-1']['path-1']; $this->options['link-2']['label-2'] = $form_state['values']['options']['link-2']['label-2']; $this->options['link-2']['path-2'] = $form_state['values']['options']['link-2']['path-2']; $this->options['link-3']['label-3'] = $form_state['values']['options']['link-3']['label-3']; $this->options['link-3']['path-3'] = $form_state['values']['options']['link-3']['path-3']; $this->options['link-4']['label-4'] = $form_state['values']['options']['link-4']['label-4']; $this->options['link-4']['path-4'] = $form_state['values']['options']['link-4']['path-4']; } /** * {@inheritdoc} */ function render($empty = FALSE) { if (!$empty || !empty($this->options['empty'])) { $output = '