You are here

fb_social_default.inc in Facebook social plugins integration 6.2

Same filename and directory in other branches
  1. 7.2 plugins/boxes/fb_social_default.inc

fb_social_comments.inc

Base class for fb_social boxes

File

plugins/boxes/fb_social_default.inc
View source
<?php

/**
 * @file fb_social_comments.inc
 * 
 * Base class for fb_social boxes 
 */
abstract class fb_social_default extends boxes_box {

  /**
   * Implementation of boxes_content::options_defaults().
   */
  public function options_defaults() {
    return fb_social_fb_plugin_defaults($this->fb_plugin_name);
  }

  /**
   * Implementation of boxes_content::options_form().
   */
  public function options_form() {
    $fieldset = array(
      '#type' => 'fieldset',
      '#title' => t('Facebook plugin attributes'),
      '#collapsible' => TRUE,
    );
    return $fieldset + ($form = fb_social_fb_plugin_fb_settings_form($this->fb_plugin_name, $this->options));
  }

  /**
   * Implementation of boxes_content::render().
   */
  public function render() {
    $title = isset($this->title) ? check_plain($this->title) : NULL;
    $block['title'] = $title;
    $block['subject'] = $title;
    $block['delta'] = $this->delta;
    $block['content'] = fb_social_box_view($this);
    return $block;
  }

}

Classes