You are here

class JquerySocialStreamBean in jQuery social stream 7

Same name and namespace in other branches
  1. 7.2 plugins/bean/jquery_social_stream.inc \JquerySocialStreamBean

@file jQuery social stream bean plugin.

Hierarchy

Expanded class hierarchy of JquerySocialStreamBean

1 string reference to 'JquerySocialStreamBean'
jquery_social_stream_bean_types in ./jquery_social_stream.module
Implements hook_bean_types().

File

plugins/bean/jquery_social_stream.inc, line 7
jQuery social stream bean plugin.

View source
class JquerySocialStreamBean extends BeanPlugin {

  /**
   * Declares default block settings.
   */
  public function values() {
    return array(
      'settings' => array(
        'conf' => array(),
      ),
    );
  }

  /**
   * Builds extra settings for the block edit form.
   */
  public function form($bean, $form, &$form_state) {
    $form = array();
    $form['settings'] = array(
      '#type' => 'fieldset',
      '#tree' => TRUE,
      '#title' => t('Options'),
    );
    $form['settings']['conf'] = jquery_social_stream_settings_form(isset($bean->settings['conf']) ? $bean->settings['conf'] : array());
    return $form;
  }

  /**
   * Displays the bean.
   */
  public function view($bean, $content, $view_mode = 'default', $langcode = NULL) {
    return jquery_social_stream_block_content(isset($bean->settings['conf']) ? $bean->settings['conf'] : array());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BeanPlugin::$plugin_info protected property
BeanPlugin::$type public property
BeanPlugin::buildURL public function Build the URL string Overrides BeanTypePluginInterface::buildURL
BeanPlugin::getDescription public function Get the description Overrides BeanTypePluginInterface::getDescription
BeanPlugin::getInfo public function Get Plugin info Overrides BeanTypePluginInterface::getInfo
BeanPlugin::getLabel public function Get the label Overrides BeanTypePluginInterface::getLabel
BeanPlugin::isEditable public function Is the bean type editable Overrides BeanTypePluginInterface::isEditable
BeanPlugin::setBean public function Add a Bean to the plugin Overrides BeanTypePluginInterface::setBean
BeanPlugin::submit public function React to the saving of the bean Overrides BeanTypePluginInterface::submit
BeanPlugin::validate public function THe plugin validation function Overrides BeanTypePluginInterface::validate
BeanPlugin::__construct public function Constructor Overrides BeanTypePluginInterface::__construct
JquerySocialStreamBean::form public function Builds extra settings for the block edit form. Overrides BeanPlugin::form
JquerySocialStreamBean::values public function Declares default block settings. Overrides BeanPlugin::values
JquerySocialStreamBean::view public function Displays the bean. Overrides BeanPlugin::view