You are here

public function FacebookBoxesFollowBlock::blockForm in Facebook Boxes 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/FacebookBoxesFollowBlock.php, line 41
Contains \Drupal\facebook_boxes\Plugin\Block\FacebookBoxesFollowBlock

Class

FacebookBoxesFollowBlock
Provides the Facebook Follow block.

Namespace

Drupal\facebook_boxes\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['fb_follow_url_text'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook Page URL'),
    '#description' => t('The full URL of your Facebook page, e.g. http://www.facebook.com/newsignature'),
    '#default_value' => $this->configuration['fb_follow_url'],
  );
  $form['fb_follow_layout_select'] = array(
    '#type' => 'select',
    '#title' => t('Layout'),
    '#options' => array(
      'standard' => 'standard',
      'box_count' => 'box_count',
      'button_count' => 'button_count',
      'button' => 'button',
    ),
    '#default_value' => $this->configuration['fb_follow_layout'],
  );
  $form['fb_follow_showface_checkbox'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show faces'),
    '#description' => t('Specifies whether to display profile photos below the button (standard layout only)'),
    '#return_value' => 1,
    '#default_value' => $this->configuration['fb_follow_showface'],
  );
  $form['fb_follow_colorscheme_select'] = array(
    '#type' => 'select',
    '#title' => t('Color Scheme'),
    '#options' => array(
      'light' => 'light',
      'dark' => 'dark',
    ),
    '#default_value' => $this->configuration['fb_follow_color'],
  );
  $form['fb_follow_font_select'] = array(
    '#type' => 'select',
    '#title' => t('Font'),
    '#options' => array(
      'arial' => 'arial',
      'lucida grande' => 'lucida grande',
      'segoe ui' => 'segoe ui',
      'tahoma' => 'tahoma',
      'trebuchet ms' => 'trebuchet ms',
      'verdana' => 'verdana',
    ),
    '#default_value' => $this->configuration['fb_follow_font'],
  );
  $form['fb_follow_width_text'] = array(
    '#type' => 'textfield',
    '#size' => 10,
    '#maxlength' => 7,
    '#title' => t('Width'),
    '#description' => t('Width of the plugin'),
    '#default_value' => $this->configuration['fb_follow_width'],
  );
  return $form;
}